Skip to content

Commit 2fd5256

Browse files
committed
Remove unused cases.
1 parent 4cc15f7 commit 2fd5256

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

jscomp/ml/typedecl.ml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -321,20 +321,7 @@ let transl_declaration ~typeRecordAsObject env sdecl id =
321321
| Ptype_abstract ->
322322
raise(Error(sdecl.ptype_loc, Bad_unboxed_attribute
323323
"it is abstract"))
324-
| Ptype_variant [{pcd_args = Pcstr_tuple []}] ->
325-
raise(Error(sdecl.ptype_loc, Bad_unboxed_attribute
326-
"its constructor has no argument"))
327-
| Ptype_variant [{pcd_args = Pcstr_tuple _}] -> ()
328-
| Ptype_variant [{pcd_args = Pcstr_record
329-
[{pld_mutable=Immutable; _}]}] -> ()
330-
| Ptype_variant [{pcd_args = Pcstr_record [{pld_mutable=Mutable; _}]}] ->
331-
raise(Error(sdecl.ptype_loc, Bad_unboxed_attribute "it is mutable"))
332-
| Ptype_variant [{pcd_args = Pcstr_record _}] ->
333-
raise(Error(sdecl.ptype_loc, Bad_unboxed_attribute
334-
"its constructor has more than one argument"))
335-
| Ptype_variant _ ->
336-
raise(Error(sdecl.ptype_loc, Bad_unboxed_attribute
337-
"it has more than one constructor"))
324+
| Ptype_variant _ -> ()
338325
| Ptype_record [{pld_mutable=Immutable; _}] -> ()
339326
| Ptype_record [{pld_mutable=Mutable; _}] ->
340327
raise(Error(sdecl.ptype_loc, Bad_unboxed_attribute

0 commit comments

Comments
 (0)