Skip to content

Support type parameters in record type spread #6291

Closed
@cristianoc

Description

@cristianoc

https://forum.rescript-lang.org/t/ann-enhanced-ergonomics-for-record-types/4480/8?u=cristianoc

Example:

type x<'a> = {
  a: 'a,
  b: int,
}

type y<'a> = {
  ...x<'a>,
  c: float,
}

There are few choices possible here. The simplest, most restrictive one is:

  • y has the same number and names of type parameters as x, then there's nothing else to check.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions