Open
Description
Compiler version
v3.3.0-RC2
Minimized code
import annotation.unchecked.uncheckedVariance
class Foo
class U1 extends Foo
class U2 extends Foo
class Box[T](x: T)
type U = U1 | U2
final val u : U1 | U2 = ???
trait TC[-T]:
type Out = Box[T @uncheckedVariance]
val value: Out @uncheckedVariance= ???
object TC:
given [T]: TC[T] = new TC[T]{}
val b1 = summon[TC[U]]
val b1Test: Box[U] = b1.value //error
Output
Found: (b1.value : b1.Out @uncheckedVariance)
Required: Box[U]
Expectation
No error.