Skip to content

Commit c31b572

Browse files
authored
Merge pull request #4609 from BuckleScript/lift_too_may_constructors_restriction
lift too many constructors restriction
2 parents 2f0c4df + 6120518 commit c31b572

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

lib/4.06.1/unstable/js_compiler.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58118,7 +58118,7 @@ let transl_declaration env sdecl id =
5811858118
raise(Error(sdecl.ptype_loc, Duplicate_constructor name));
5811958119
all_constrs := StringSet.add name !all_constrs)
5812058120
scstrs;
58121-
if List.length
58121+
if not !Config.bs_only && List.length
5812258122
(List.filter (fun cd -> cd.pcd_args <> Pcstr_tuple []) scstrs)
5812358123
> (Config.max_tag + 1) then
5812458124
raise(Error(sdecl.ptype_loc, Too_many_constructors));

lib/4.06.1/unstable/js_refmt_compiler.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58118,7 +58118,7 @@ let transl_declaration env sdecl id =
5811858118
raise(Error(sdecl.ptype_loc, Duplicate_constructor name));
5811958119
all_constrs := StringSet.add name !all_constrs)
5812058120
scstrs;
58121-
if List.length
58121+
if not !Config.bs_only && List.length
5812258122
(List.filter (fun cd -> cd.pcd_args <> Pcstr_tuple []) scstrs)
5812358123
> (Config.max_tag + 1) then
5812458124
raise(Error(sdecl.ptype_loc, Too_many_constructors));

lib/4.06.1/whole_compiler.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342337,7 +342337,7 @@ let transl_declaration env sdecl id =
342337342337
raise(Error(sdecl.ptype_loc, Duplicate_constructor name));
342338342338
all_constrs := StringSet.add name !all_constrs)
342339342339
scstrs;
342340-
if List.length
342340+
if not true && List.length
342341342341
(List.filter (fun cd -> cd.pcd_args <> Pcstr_tuple []) scstrs)
342342342342
> (Config.max_tag + 1) then
342343342343
raise(Error(sdecl.ptype_loc, Too_many_constructors));

ocaml

Submodule ocaml updated from 92e58be to f6900f7

0 commit comments

Comments
 (0)