Dialyzer issues
This commit is contained in:
parent
cb045b0256
commit
63d51baaa3
@ -113,6 +113,7 @@
|
||||
|
||||
-type fcode() :: #{ contract_name := string(),
|
||||
state_type := ftype(),
|
||||
state_layout := state_layout(),
|
||||
event_type := ftype() | none,
|
||||
functions := #{ fun_name() => fun_def() },
|
||||
payable := boolean() }.
|
||||
@ -1341,6 +1342,7 @@ simpl_switch(Env, E, [{'case', Pat, Body} | Alts]) ->
|
||||
end
|
||||
end.
|
||||
|
||||
-spec match_pat(fsplit_pat(), fexpr()) -> false | [{var_name(), fexpr()}].
|
||||
match_pat({tuple, Xs}, {tuple, Es}) -> lists:zip(Xs, Es);
|
||||
match_pat({con, _, C, Xs}, {con, _, C, Es}) -> lists:zip(Xs, Es);
|
||||
match_pat(L, {lit, L}) -> [];
|
||||
@ -1369,6 +1371,8 @@ constructor_form(Env, Expr) ->
|
||||
{con, _, _, _} -> Expr;
|
||||
{tuple, _} -> Expr;
|
||||
{lit, _} -> Expr;
|
||||
nil -> Expr;
|
||||
{op, '::', _} -> Expr;
|
||||
_ -> false
|
||||
end.
|
||||
|
||||
@ -1672,7 +1676,7 @@ bottom_up(F, Env, Expr) ->
|
||||
{funcall, Fun, Es} -> {funcall, bottom_up(F, Env, Fun), [bottom_up(F, Env, E) || E <- Es]};
|
||||
{set_state, R, E} -> {set_state, R, bottom_up(F, Env, E)};
|
||||
{get_state, _} -> Expr;
|
||||
{closure, F, Env} -> {closure, F, bottom_up(F, Env, Env)};
|
||||
{closure, F, CEnv} -> {closure, F, bottom_up(F, Env, CEnv)};
|
||||
{switch, Split} -> {switch, bottom_up(F, Env, Split)};
|
||||
{lam, Xs, B} -> {lam, Xs, bottom_up(F, Env, B)};
|
||||
{'let', X, E, Body} ->
|
||||
|
@ -304,7 +304,7 @@ to_scode(Env, {remote, ArgsT, RetT, Ct, Fun, [Gas, Value | Args]}) ->
|
||||
to_scode(_Env, {get_state, Reg}) ->
|
||||
[push(?s(Reg))];
|
||||
to_scode(Env, {set_state, Reg, Val}) ->
|
||||
call_to_scode(Env, [aeb_fate_ops:store(?s(Reg), ?a),
|
||||
call_to_scode(Env, [{'STORE', ?s(Reg), ?a},
|
||||
tuple(0)], [Val]);
|
||||
|
||||
to_scode(Env, {closure, Fun, FVs}) ->
|
||||
|
Loading…
x
Reference in New Issue
Block a user