Closed as not planned
Description
Type test for locally defined classes (eg. within method) ends up with a warning. Not sure if it's a false negative positive introduced via regression or an improvement.
Compiler version
3.2.1
Minimized code
@main def Test = {
class A(private val x: Int) {
override def equals(that: Any): Boolean = that match {
case that: A => this.x == that.x
case _ => false
}
}
}
Output
Compiling project (Scala 3.2.1, JVM)
[warn] ./sandbox/src/main/scala/Test.scala:5:12: the type test for A cannot be checked at runtime
[warn] case that: A => this.x == that.x