Skip to content

Error message mentioning function$ #6662

Closed
@cknitt

Description

@cknitt

v11 uncurried mode:

let (value, setValue) = React.useState(() => None)

// Correct
setValue(_ => Some(42))

// Incorrect
setValue(Some(42))

Error message for the second setValue:

The constructor Some does not belong to type function$
  
  This variant expression is expected to have type option<int> => option<int>

function$ is an implementation detail of uncurried functions and should not appear in a user-facing error message.

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