Closed
Description
Compiler version
3.6.4-RC1-bin-20241122-64411b6-NIGHTLY and earlier
Minimized code
import scala.language.experimental.namedTuples
class SelectableNT[A <: NamedTuple.AnyNamedTuple](val nt: A) extends Selectable:
type Fields = A
def selectDynamic(x: String) = ???
object Test:
val a = (name = "foo", age = 1)
val sa = SelectableNT(a)
sa.name // ok
type B = a.type
val b: B = a
val sb = SelectableNT(b)
sb.name // fails
Output
value name is not a member of bug.SelectableNT[(bug.Test.a : (name : String, age : Int))]
Expectation
Successful compilation