-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
area:named-tuplesIssues tied to the named tuples feature.Issues tied to the named tuples feature.itype:bugstat:needs triageEvery issue needs to have an "area" and "itype" labelEvery issue needs to have an "area" and "itype" label
Description
From #23155
Compiler version
3.7.2-RC1-bin-SNAPSHOT
Minimized code
Seems no named tuple key validation occurs at all when not using the explicit syntax:
val explicit: (_1: Int, _1: Int) = ??? // error, both for the duplicate and "_1" cannot be a named tuple selector because clashes with regular tuple selectors
val viaTupleN: NamedTuple.NamedTuple[Tuple2["_1", "_1"], Tuple2[Int, Int]] = ??? // no error
val viaTupleExpl: NamedTuple.NamedTuple[("_1", "_1"), (Int, Int)] = ??? // no error
val viaCons: NamedTuple.NamedTuple["_1" *: "_1" *: EmptyTuple, Int *: Int *: EmptyTuple] = ??? // no error
Do we want to ensure we're checking for any key name restrictions on the desugared tuples, or document that the NamedTuple syntax shouldn't be used in user code directly?
Metadata
Metadata
Assignees
Labels
area:named-tuplesIssues tied to the named tuples feature.Issues tied to the named tuples feature.itype:bugstat:needs triageEvery issue needs to have an "area" and "itype" labelEvery issue needs to have an "area" and "itype" label