@@ -273588,6 +273588,16 @@ let argToConcreteType types (name, _loc, type_) =
273588273588 | name when isOptional name -> (true, getLabel name, [], type_) :: types
273589273589 | _ -> types
273590273590
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+
273591273601let transformStructureItem ~config mapper item =
273592273602 match item with
273593273603 (* external *)
@@ -273604,6 +273614,8 @@ let transformStructureItem ~config mapper item =
273604273614 React_jsx_common.raiseErrorMultipleReactComponent ~loc:pstr_loc
273605273615 else (
273606273616 config.hasReactComponent <- true;
273617+ check_string_int_attribute_iter.structure_item
273618+ check_string_int_attribute_iter item;
273607273619 let rec getPropTypes types ({ptyp_loc; ptyp_desc} as fullType) =
273608273620 match ptyp_desc with
273609273621 | Ptyp_arrow (name, type_, ({ptyp_desc = Ptyp_arrow _} as rest))
@@ -274050,6 +274062,8 @@ let transformSignatureItem ~config _mapper item =
274050274062 if config.React_jsx_common.hasReactComponent then
274051274063 React_jsx_common.raiseErrorMultipleReactComponent ~loc:psig_loc
274052274064 else config.hasReactComponent <- true;
274065+ check_string_int_attribute_iter.signature_item
274066+ check_string_int_attribute_iter item;
274053274067 let hasForwardRef = ref false in
274054274068 let rec getPropTypes types ({ptyp_loc; ptyp_desc} as fullType) =
274055274069 match ptyp_desc with
0 commit comments