From c0f4aaf0c7f61605dfe4d30390c4105a0c42608b Mon Sep 17 00:00:00 2001 From: Christian Rinderknecht Date: Thu, 24 Oct 2019 10:29:41 +0200 Subject: [PATCH] Fixed the regression on case clauses (blocks were removed). --- src/passes/2-simplify/pascaligo.ml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/passes/2-simplify/pascaligo.ml b/src/passes/2-simplify/pascaligo.ml index 1821627a4..64816920c 100644 --- a/src/passes/2-simplify/pascaligo.ml +++ b/src/passes/2-simplify/pascaligo.ml @@ -718,14 +718,14 @@ and simpl_single_instruction : Raw.instruction -> (_ -> expression result) resul LongBlock {value; _} -> simpl_block value | ShortBlock {value; _} -> - simpl_statements @@ fst value.inside in - ok (x.value.pattern, case_clause None) in + simpl_statements @@ fst value.inside in + let%bind case_clause = case_clause None in + ok (x.value.pattern, case_clause) in bind_list @@ List.map aux @@ npseq_to_list c.cases.value in let%bind m = simpl_cases cases in - let%bind toto = ok @@ e_matching ~loc expr m in - return_statement @@ toto + return_statement @@ e_matching ~loc expr m ) | RecordPatch r -> ( let r = r.value in