Skip to content

Uncurrying breaks components with local type variables #6625

Closed
@glennsl

Description

@glennsl

Repro, in v11 with uncurrying enabled:

module A = {
  @react.component
  let make = (type a, ~foo=?) => React.null
}

<A />

yields the error:

[E] Line 6, column 1:
This has type: A.props => (~foo: 'a=?) => React.element
  But this function argument is expecting:
    React.component<A.props> (defined as A.props => Jsx.element)
  
  The incompatible parts:
    (~foo: 'a=?) => React.element vs Jsx.element (defined as JsxU.element)

This works both in v10, and v11 with uncurrying disabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions