Open
Description
Compiler version
3.6.2
Minimized code
type IntLike[T] <: Boolean = T match
case Int => true
@annotation.implicitNotFound("Comparing ${T} to Int")
type IsIntLike[T] = IntLike[T] =:= true
type Indirection[A] = IsIntLike[A] & (true =:= true) // something after & is needed for reproduction
def f[Z](using Indirection[Z]): Unit = ()
@main def main(): Unit = f[Double]
Output
[error] -- [E172] Type Error: Main.scala:7:34
[error] 7 |@main def main(): Unit = f[Double]
[error] | ^
[error] | Comparing A to Int
[error] one error found
Expectation
This is supposed to not compile, the problem is with the error message. The custom error message prints A
which is the parameter name from Indirection
instead of its value Double
.