File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ let emit_external_warnings : iterator=
107107 )
108108 | _ -> default_iterator.expr self a
109109 );
110- label_declaration = (fun self lbl ->
110+ label_declaration = (fun self lbl ->
111111
112112 Ext_list. iter lbl.pld_attributes
113113 (fun attr ->
@@ -117,6 +117,14 @@ let emit_external_warnings : iterator=
117117 );
118118 default_iterator.label_declaration self lbl
119119 );
120+ constructor_declaration = (fun self ({pcd_name} as ctr ) ->
121+ (match pcd_name.txt with
122+ | " false"
123+ | "true" ->
124+ Location. raise_errorf ~loc: pcd_name.loc " true/false can not be redefined "
125+ | _ -> () );
126+ default_iterator.constructor_declaration self ctr
127+ );
120128 value_description =
121129 (fun self v ->
122130 match v with
You can’t perform that action at this time.
0 commit comments