Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NamedTuple.Empty is not a NamedTuple #20428

Closed
smarter opened this issue May 17, 2024 · 0 comments · Fixed by #20502
Closed

NamedTuple.Empty is not a NamedTuple #20428

smarter opened this issue May 17, 2024 · 0 comments · Fixed by #20502
Labels
area:experimental:named-tuples Issues tied to the named tuples feature. itype:bug
Milestone

Comments

@smarter
Copy link
Member

smarter commented May 17, 2024

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]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:experimental:named-tuples Issues tied to the named tuples feature. itype:bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants