Open
Description
Compiler version
3.0.2
Minimized code
object O{
val v = [T] => (y:T) => (x:y.type) => 3
def m = v(v) // works
}
object O2{
val v = [T] => (y:T) => (x:y.type) => 3
def m = v(identity(v)) // error
}
Output
When compiling with -Ycheck:
exception occurred while compiling i6682a.scala
java.lang.AssertionError: assertion failed: Found: [T] => (y: T) => y.type => Int
Required: [T] => (y: Any) => y².type => Int
where: y is a reference to a value parameter
y² is a reference to a value parameter```
Expectation
No errors