Ban using contracts as namespaces #919

Merged
ghallak merged 5 commits from ghallak/412 into master 2022-11-23 18:03:24 +09:00
Showing only changes of commit 3b7f083817 - Show all commits

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 ->