Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Type error on empty record with fragments in automatic mode #703

Closed
rescript-lang/rescript-react
#77
@cristianoc

Description

@cristianoc

This:

module Automatic = {
  @react.component
  let make = () => {
    <> </>
  }
}

produces:

module Automatic = {
  type props = {}

  @react.component
  let make = (_: props) => {
    React.jsx(React.jsxFragment, {children: {}})
  }
  let make = {
    let \"OptionalKeyType$Automatic" = props => make(props)

    \"OptionalKeyType$Automatic"
  }
}

which gives a type errow (without location information):

  We've found a bug for you!
  /Users/cristianocalcagno/GitHub/rescript-vscode/analysis/tests/src/Completion.res

  Empty record literal {} should be type annotated or used in a record context.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions