Closed
Description
Compiler version
3.0.0-RC2-bin-20210325-eeb8340-NIGHTLY
Minimized code
sealed trait X[A]
object X {
erased given unit: X[Unit] = compiletime.erasedValue
}
def x[A](f: List[A])(using erased X[A]): Int =
123
def y(f: List[Unit]): Int =
x(f)
Output
[error] 12 | x(f)
[error] | ^
[error] | getter unit is declared as erased, but is in fact used
Expectation
It should compile.