Skip to content

Commit

Permalink
flambda-backend: Fix error with Record_unboxed (bug in block kind pat…
Browse files Browse the repository at this point in the history
…ch) (ocaml#119)
  • Loading branch information
mshinwell authored Jul 28, 2021
1 parent 2d35761 commit 14dcc38
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion typing/typeopt.ml
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,12 @@ let value_kind env ty =
| Record_inlined tag ->
Pblock { tag; fields }
| Record_unboxed _ ->
assert false
begin match fields with
| [field] -> field
| [] | _::_ ->
Misc.fatal_error "Records that are [Record_unboxed] should \
have exactly one field"
end
| Record_extension _ ->
Pgenval
end
Expand Down

0 comments on commit 14dcc38

Please sign in to comment.