Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion library/src/scala/NamedTuple.scala
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ object NamedTupleDecomposition:
import NamedTuple.*
extension [N <: Tuple, V <: Tuple](x: NamedTuple[N, V])
/** The value (without the name) at index `n` of this tuple */
inline def apply(n: Int): Tuple.Elem[V, n.type] =
transparent inline def apply(n: Int): Tuple.Elem[V, n.type] =
inline x.toTuple match
case tup: NonEmptyTuple => tup(n).asInstanceOf[Tuple.Elem[V, n.type]]
case tup => tup.productElement(n).asInstanceOf[Tuple.Elem[V, n.type]]
Expand Down
6 changes: 6 additions & 0 deletions tests/pos/i21413.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//> using scala 3.nightly

import scala.language.experimental.namedTuples

val x = (aaa = 1).aaa

Loading