Closed
Description
Compiler version
3.0.0
Minimized code
trait Signature:
type Impl[A, U]
type Operation[Z <: Signature, A, U] = (z: Z) => z.Impl[A, U]
// This produces error:
case class Perform[Z <: Signature, A, U](op: Operation[Z, A, U])
// However, if I manually inline the type alias, the error goes away:
case class Perform_fix[Z <: Signature, A, U](op: (z: Z) => z.Impl[A, U])
// Also, using the alias in other contexts does not produce errors:
def foo[Z <: Signature, A, U](op: Operation[Z, A, U]): Unit = ???
Above snippet in Scastie: https://scastie.scala-lang.org/h8VPuvAMS72F42Cb11RubA
Output
Found: (Perform.this.op : Operation[Z, A, U])
Required: Operation[<? <: Signature>, <?>, <?>]
Expectation
Not having to manually inline the type alias.