We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2b56a9 commit 00afb08Copy full SHA for 00afb08
jscomp/syntax/bs_ast_invariant.ml
@@ -117,11 +117,12 @@ let emit_external_warnings : iterator=
117
);
118
default_iterator.label_declaration self lbl
119
120
- constructor_declaration = (fun self ({pcd_name} as ctr) ->
121
- (match pcd_name.txt with
+ constructor_declaration = (fun self ({pcd_name = {txt;loc}} as ctr) ->
+ (match txt with
122
| "false"
123
- | "true" ->
124
- Location.raise_errorf ~loc:pcd_name.loc "true/false can not be redefined "
+ | "true"
+ | "()" ->
125
+ Location.raise_errorf ~loc:loc "%s can not be redefined " txt
126
| _ -> ());
127
default_iterator.constructor_declaration self ctr
128
0 commit comments