diff --git a/compiler/syntax/src/jsx_v4.ml b/compiler/syntax/src/jsx_v4.ml index aed65e69f3..b1a0b2602e 100644 --- a/compiler/syntax/src/jsx_v4.ml +++ b/compiler/syntax/src/jsx_v4.ml @@ -1267,10 +1267,7 @@ let map_binding ~config ~empty_loc ~pstr_loc ~file_name ~rec_flag binding = [(Nolabel, Exp.ident {txt = Lident "props"; loc})])) in - let wrapper_expr = - Ast_uncurried.uncurried_fun ~loc:wrapper_expr.pexp_loc ~arity:1 - wrapper_expr - in + let wrapper_expr = Ast_uncurried.uncurried_fun ~arity:1 wrapper_expr in let internal_expression = Exp.let_ Nonrecursive diff --git a/tests/build_tests/super_errors/expected/react_component_with_props.res.expected b/tests/build_tests/super_errors/expected/react_component_with_props.res.expected index 66083eef22..c92961ce8c 100644 --- a/tests/build_tests/super_errors/expected/react_component_with_props.res.expected +++ b/tests/build_tests/super_errors/expected/react_component_with_props.res.expected @@ -1,11 +1,11 @@ We've found a bug for you! - /.../fixtures/react_component_with_props.res:4:5-13:10 + /.../fixtures/react_component_with_props.res:3:31-13:10 + 1 │ module V4C7 = { 2 │ @react.componentWithProps - 3 │ let make = React.forwardRef(( - 4 │ ~className=?, - 5 │  ~children, + 3 │ let make = React.forwardRef(( + 4 │  ~className=?, . │ ... 12 │  children 13 │