Closed as not planned
Closed as not planned
Description
Based on Open CB failure in playframework/playframework
- builds logs
Compiler version
3.6.0-RC1-bin-20240915-ad8c21a-NIGHTLY
Bisect points to e7d479f / #21362
Minimized code
import java.util.List;
public class RoutingDsl {
final List<Route> routes = null;
static class Method {}
private static class Route {
final Method actionMethod = null;
}
}
@main def Test =
val x: RoutingDsl = ???
x.routes.forEach: route =>
println(route.actionMethod) // error
Output
Compiling project (Scala 3.6.0-RC1-bin-20240915-ad8c21a-NIGHTLY, JVM (17))
[error] ./test.scala:4:13
[error] Unable to emit reference to value actionMethod in class Route, class Route is not accessible in the top-level definitions in package <empty>
[error] println(route.actionMethod)
[error] ^^^^^
Expectation
Should compile. This code does compile in Scala 3.5.0 and lower. It also compiles in Scala 2.12/2.13