Skip to content

Commit 8b65788

Browse files
authored
[Fulminate] Add default to switch from match (#456)
1 parent f0aa212 commit 8b65788

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

lib/fulminate/cn_to_ail.ml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1783,7 +1783,17 @@ let rec cn_to_ail_expr_aux
17831783
}
17841784
in
17851785
let e1_transformed = transform_switch_expr e1 in
1786-
let ail_case_stmts = List.map build_case dt.cn_dt_cases in
1786+
let ail_case_stmts =
1787+
List.map build_case dt.cn_dt_cases
1788+
@ [ mk_stmt
1789+
(AilSdefault
1790+
(mk_stmt
1791+
(AilSreturn
1792+
(mk_expr
1793+
(AilEconst
1794+
(ConstantInteger (IConstant (Z.zero, Decimal, None))))))))
1795+
]
1796+
in
17871797
let switch =
17881798
A.(
17891799
AilSswitch

0 commit comments

Comments
 (0)