Closed
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?