-
Bug
-
Resolution: Fixed
-
P3
-
None
-
None
The below code should throw a compilation error as record is declared in an inner class. However, the compilation goes through successfully.
class Outer {
class Inner {
record R(int a) {}
}
}
class RecordsTest {
public static void main(String[] args) {
Outer.Inner.R rec = new Outer.Inner.R(1);
System.out.println(rec.a());
}
}
class Outer {
class Inner {
record R(int a) {}
}
}
class RecordsTest {
public static void main(String[] args) {
Outer.Inner.R rec = new Outer.Inner.R(1);
System.out.println(rec.a());
}
}