diff --git a/library/src/scala/NamedTuple.scala b/library/src/scala/NamedTuple.scala index c65a760ee22c..ddc2b545f9ba 100644 --- a/library/src/scala/NamedTuple.scala +++ b/library/src/scala/NamedTuple.scala @@ -6,7 +6,7 @@ import compiletime.ops.boolean.* object NamedTuple: opaque type AnyNamedTuple = Any - opaque type NamedTuple[N <: Tuple, V <: Tuple] >: V <: AnyNamedTuple = V + opaque type NamedTuple[N <: Tuple, +V <: Tuple] >: V <: AnyNamedTuple = V def apply[N <: Tuple, V <: Tuple](x: V) = x diff --git a/tests/neg/named-tuples.check b/tests/neg/named-tuples.check index 485858fb18a0..067b6eeb937c 100644 --- a/tests/neg/named-tuples.check +++ b/tests/neg/named-tuples.check @@ -90,9 +90,7 @@ 47 | val p5 = person.zip(first = 11, age = 33) // error | ^^^^^^^^^^^^^^^^^^^^ | Found: (first : Int, age : Int) - | Required: NamedTuple.NamedTuple[(("name" : String), ("age" : String)), V2] - | - | where: V2 is a type variable with constraint <: Tuple + | Required: NamedTuple.NamedTuple[(("name" : String), ("age" : String)), Tuple] | | longer explanation available when compiling with `-explain` -- Warning: tests/neg/named-tuples.scala:24:29 -------------------------------------------------------------------------