diff options
Diffstat (limited to 'src/boot')
| -rw-r--r-- | src/boot/me/trans.ml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/boot/me/trans.ml b/src/boot/me/trans.ml index 58cccb99..34f4d81d 100644 --- a/src/boot/me/trans.ml +++ b/src/boot/me/trans.ml @@ -4895,7 +4895,14 @@ let trans_visitor last_jump in let last_jumps = Array.map trans_arm at.Ast.alt_tag_arms in - Array.iter patch last_jumps + if not (arr_exists + (fun _ arm -> (fst arm.node) = Ast.PAT_wild) + at.Ast.alt_tag_arms) + then + trans_cond_fail "non-exhaustive match failure" + (Array.to_list last_jumps) + else + Array.iter patch last_jumps (* If we're about to drop a channel, synthesize an upcall_flush_chan. * TODO: This should rather appear in a chan dtor when chans become |