File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import compiletime.ops.boolean.*
66object NamedTuple :
77
88 opaque type AnyNamedTuple = Any
9- opaque type NamedTuple [N <: Tuple , V <: Tuple ] >: V <: AnyNamedTuple = V
9+ opaque type NamedTuple [N <: Tuple , + V <: Tuple ] >: V <: AnyNamedTuple = V
1010
1111 def apply [N <: Tuple , V <: Tuple ](x : V ) = x
1212
Original file line number Diff line number Diff line change 909047 | val p5 = person.zip(first = 11, age = 33) // error
9191 | ^^^^^^^^^^^^^^^^^^^^
9292 | Found: (first : Int, age : Int)
93- | Required: NamedTuple.NamedTuple[(("name" : String), ("age" : String)), V2]
94- |
95- | where: V2 is a type variable with constraint <: Tuple
93+ | Required: NamedTuple.NamedTuple[(("name" : String), ("age" : String)), Tuple]
9694 |
9795 | longer explanation available when compiling with `-explain`
9896-- Warning: tests/neg/named-tuples.scala:24:29 -------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments