Pattern matching case classes and companion object #21582
-
hi,
then we get a runtime error like this:
Here the pattern matches on the case class companion object, is it really of type Example? Why is it even allowed in the pattern match by the compiler? You only get a warning if you put the compiler flag "-Ycheck-all-patmat" |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi, this seems to be a regression in Scala 3.5. Please open an issue ticket for it. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Those warnings were moved to |
Beta Was this translation helpful? Give feedback.
Those warnings were moved to
-Wimplausible-patterns
in 3.4. In #18093