Open
Description
Compiler version
3.3.6-RC1 and 3.7.0-RC1 both display the issue.
Minimized code
case class RequestLogsOuter(streamId: Int)
@main def Test = {
case class RequestLogs(streamId: Int)
var x: List[Any] = List(RequestLogsOuter(12), RequestLogs(36), RequestLogs(42), 42)
x.collect{
case outer @ RequestLogsOuter(id) => println(1)
case RequestLogs(42) => println(2) // warns in 3.3.6
case v: RequestLogs => println(3) // warned in 3.3.5 if above is commented out
}
}
Output
the type test for RequestLogs cannot be checked at runtime because it's a local class
Expectation
The code work correctly despite the warning, is that expected? Most likely showed up after #22099