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 3838a47694 - Show all commits

View File

@ -229,7 +229,7 @@ force_bind_fun(X, Type, Env = #env{ what = What }) ->
NoCode = get_option(no_code, false), NoCode = get_option(no_code, false),
Entry = if X == "init", What == contract, not NoCode -> Entry = if X == "init", What == contract, not NoCode ->
{reserved_init, Ann, Type}; {reserved_init, Ann, Type};
What == contract orelse What == contract_interface -> {contract_fun, Ann, Type}; What == contract; What == contract_interface -> {contract_fun, Ann, Type};
true -> {Ann, Type} true -> {Ann, Type}
end, end,
on_current_scope(Env, fun(Scope = #scope{ funs = Funs }) -> on_current_scope(Env, fun(Scope = #scope{ funs = Funs }) ->