Ban using contracts as namespaces

This commit is contained in:
Gaith Hallak 2022-11-18 16:59:57 +03:00
parent 9e95e8efb6
commit 3b7f083817

View File

@ -1257,6 +1257,10 @@ check_usings(Env = #env{ used_namespaces = UsedNamespaces }, [{using, Ann, Con,
create_type_errors(), create_type_errors(),
type_error({using_undefined_namespace, Ann, qname(Con)}), type_error({using_undefined_namespace, Ann, qname(Con)}),
destroy_and_report_type_errors(Env); destroy_and_report_type_errors(Env);
#scope{kind = contract} ->
create_type_errors(),
type_error({using_undefined_namespace, Ann, qname(Con)}),
destroy_and_report_type_errors(Env);
Scope -> Scope ->
Nsp = case Parts of Nsp = case Parts of
none -> none ->