Skip to content

NamedTuple.Empty is not a NamedTuple #20428

Closed
@smarter

Description

@smarter

Compiler version

3.5.0-RC1-bin-20240516-c608177-NIGHTLY

Minimized code

type NT = NamedTuple.Concat[NamedTuple.Empty, (bla: String)]

Output

[error] Type argument NamedTuple.Empty does not conform to upper bound NamedTuple.AnyNamedTuple
[error]   type NT = NamedTuple.Concat[NamedTuple.Empty, (bla: String)]
[error]                                          ^

Expectation

No error.

It seems that

type Empty = EmptyTuple.type
should be replaced by something like:

type Empty = NamedTuple[EmptyTuple.type, EmptyTuple.type]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions