@@ -273588,6 +273588,16 @@ let argToConcreteType types (name, _loc, type_) =
273588
273588
| name when isOptional name -> (true, getLabel name, [], type_) :: types
273589
273589
| _ -> types
273590
273590
273591
+ let check_string_int_attribute_iter =
273592
+ let attribute _ ({txt; loc}, _) =
273593
+ if txt = "string" || txt = "int" then
273594
+ React_jsx_common.raiseError ~loc
273595
+ "@string and @int attributes not supported. See \
273596
+ https://github.com/rescript-lang/rescript-compiler/issues/5724"
273597
+ in
273598
+
273599
+ {Ast_iterator.default_iterator with attribute}
273600
+
273591
273601
let transformStructureItem ~config mapper item =
273592
273602
match item with
273593
273603
(* external *)
@@ -273604,6 +273614,8 @@ let transformStructureItem ~config mapper item =
273604
273614
React_jsx_common.raiseErrorMultipleReactComponent ~loc:pstr_loc
273605
273615
else (
273606
273616
config.hasReactComponent <- true;
273617
+ check_string_int_attribute_iter.structure_item
273618
+ check_string_int_attribute_iter item;
273607
273619
let rec getPropTypes types ({ptyp_loc; ptyp_desc} as fullType) =
273608
273620
match ptyp_desc with
273609
273621
| Ptyp_arrow (name, type_, ({ptyp_desc = Ptyp_arrow _} as rest))
@@ -274050,6 +274062,8 @@ let transformSignatureItem ~config _mapper item =
274050
274062
if config.React_jsx_common.hasReactComponent then
274051
274063
React_jsx_common.raiseErrorMultipleReactComponent ~loc:psig_loc
274052
274064
else config.hasReactComponent <- true;
274065
+ check_string_int_attribute_iter.signature_item
274066
+ check_string_int_attribute_iter item;
274053
274067
let hasForwardRef = ref false in
274054
274068
let rec getPropTypes types ({ptyp_loc; ptyp_desc} as fullType) =
274055
274069
match ptyp_desc with
0 commit comments