jdk-24/test/langtools/tools/javac/InterfaceInInner.java
2022-07-29 17:35:22 +00:00

18 lines
421 B
Java

/*
* @test /nodynamiccopyright/
* @bug 4063740 6969184
* @summary Interfaces can be declared in inner classes only for release >= 16
* @author turnidge
*
* @compile/fail/ref=InterfaceInInner.out -XDrawDiagnostics --release 15 InterfaceInInner.java
* @compile InterfaceInInner.java
*/
class InterfaceInInner {
InterfaceInInner() {
class foo {
interface A {
}
}
}
}