Skip to content

Commit 7f213fc

Browse files
committed
Allow empty functions again
1 parent 8f22ad8 commit 7f213fc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lambda/translcore.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,8 @@ and transl_function0
10981098
let arg_mode, kind =
10991099
match cases with
11001100
| [] ->
1101-
Misc.fatal_error "transl_function0: no cases"
1101+
(* With Camlp4, a pattern matching might be empty *)
1102+
Alloc_heap, Pgenval
11021103
| {c_lhs=pat} :: other_cases ->
11031104
(* All the patterns might not share the same types. We must take the
11041105
union of the patterns types *)

0 commit comments

Comments
 (0)