Please dialyzer

This commit is contained in:
radrow 2021-05-17 08:55:40 +02:00
parent 6789b739a5
commit b9d018ec35

View File

@ -346,17 +346,18 @@ to_fcode(Env, [{Contract, Attrs, Con = {con, _, Name}, Decls}|Rest])
state_layout => StateLayout, state_layout => StateLayout,
event_type => EventType, event_type => EventType,
payable => Payable, payable => Payable,
functions => add_init_function(Env1, Con, StateType, functions => add_init_function(
add_event_function(Env1, EventType, Funs)) }, Env1, Con, StateType,
add_event_function(Env1, EventType, Funs)) },
case Contract of case Contract of
contract_main -> Rest = [], {Env1, ConFcode}; contract_main -> [] = Rest, {Env1, ConFcode};
contract_child -> contract_child ->
Env2 = add_child_con(Env1, Name, ConFcode), Env2 = add_child_con(Env1, Name, ConFcode),
Env3 = Env2#{ functions := PrevFuns }, Env3 = Env2#{ functions := PrevFuns },
to_fcode(Env3, Rest) to_fcode(Env3, Rest)
end; end;
true -> true ->
Env1 = decls_to_fcode(Env#{ context => {abstract_contract, Con} }, Decls), Env1 = decls_to_fcode(Env#{ context => {abstract_contract, Name} }, Decls),
to_fcode(Env1, Rest) to_fcode(Env1, Rest)
end; end;
to_fcode(_Env, [NotMain = {NotMainHead, _ ,_ , _}]) when NotMainHead =/= contract_def -> to_fcode(_Env, [NotMain = {NotMainHead, _ ,_ , _}]) when NotMainHead =/= contract_def ->