From 6806554d77768985a3bea15af45f2afedb0bfd5f Mon Sep 17 00:00:00 2001 From: Ulf Norell Date: Thu, 25 Apr 2019 13:22:56 +0200 Subject: [PATCH] Remove incorrect push for tuple switches --- src/aeso_fcode_to_fate.erl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/aeso_fcode_to_fate.erl b/src/aeso_fcode_to_fate.erl index aa893ef..f814284 100644 --- a/src/aeso_fcode_to_fate.erl +++ b/src/aeso_fcode_to_fate.erl @@ -201,11 +201,10 @@ split_to_scode(Env, {split, {tuple, _}, X, Alts}) -> {Code, Env1} = match_tuple(Env, Arg, Xs), [Code, split_to_scode(Env1, S)] end, - [aeb_fate_code:push(Arg), - case Def == missing andalso Alt /= missing of - true -> Alt; % skip the switch if single tuple pattern - false -> {switch, tuple, [Alt], Def} - end]; + case Def == missing andalso Alt /= missing of + true -> Alt; % skip the switch if single tuple pattern + false -> [{switch, tuple, [Alt], Def}] + end; split_to_scode(Env, {split, boolean, X, Alts}) -> {Def, Alts1} = catchall_to_scode(Env, X, Alts), GetAlt = fun(B) ->