-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
SpreeSuitable for a future SpreeSuitable for a future Spreearea:reportingError reporting including formatting, implicit suggestions, etcError reporting including formatting, implicit suggestions, etcgood first issuePerfect for someone who wants to get started contributingPerfect for someone who wants to get started contributingitype:bug
Milestone
Description
Regression reproduced based on Open CB #4730 found in fd4s/vulcan
Part of the #15949 regression tracker
I'm not sure if it's a regression or an improvement. Code, where the error was reported, has not changed recently, so probably these warnings should be checked
Compiler version
Produces warning in 3.2.1-RC1
No warnings in 3.2.0
Minimized code
//> using options "-Xfatal-warnings"
val _ = locally{
sealed abstract class PosInt(val value: Int) {
override def equals(any: Any): Boolean = any.isInstanceOf[PosInt]
}
}
Output
Compiling project (Scala 3.2.1-RC1, JVM)
[error] ./test.scala:5:46: the type test for PosInt cannot be checked at runtime
[error] override def equals(any: Any): Boolean = any.isInstanceOf[PosInt]
[error]
Expectation
Should compile
Metadata
Metadata
Assignees
Labels
SpreeSuitable for a future SpreeSuitable for a future Spreearea:reportingError reporting including formatting, implicit suggestions, etcError reporting including formatting, implicit suggestions, etcgood first issuePerfect for someone who wants to get started contributingPerfect for someone who wants to get started contributingitype:bug