Skip to content

Commit 14dcc38

Browse files
authored
flambda-backend: Fix error with Record_unboxed (bug in block kind patch) (#119)
1 parent 2d35761 commit 14dcc38

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

typing/typeopt.ml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,12 @@ let value_kind env ty =
233233
| Record_inlined tag ->
234234
Pblock { tag; fields }
235235
| Record_unboxed _ ->
236-
assert false
236+
begin match fields with
237+
| [field] -> field
238+
| [] | _::_ ->
239+
Misc.fatal_error "Records that are [Record_unboxed] should \
240+
have exactly one field"
241+
end
237242
| Record_extension _ ->
238243
Pgenval
239244
end

0 commit comments

Comments
 (0)