Disallow calling init from inside the contract

This commit is contained in:
Ulf Norell
2019-09-03 09:47:19 +02:00
committed by Hans Svensson
parent 58ab771dff
commit 470970d937
3 changed files with 37 additions and 28 deletions
+1 -1
View File
@@ -144,7 +144,7 @@ string_to_code(ContractString, Options) ->
Ast = parse(ContractString, Options),
pp_sophia_code(Ast, Options),
pp_ast(Ast, Options),
{TypeEnv, TypedAst} = aeso_ast_infer_types:infer(Ast, [return_env]),
{TypeEnv, TypedAst} = aeso_ast_infer_types:infer(Ast, [return_env | Options]),
pp_typed_ast(TypedAst, Options),
case proplists:get_value(backend, Options, aevm) of
aevm ->