jdk-24/test/langtools/tools/javac/InterfaceInInner.java
Vicente Romero 9a19eb6918 8254105: allow static nested declarations
Reviewed-by: mcimadamore
2020-11-21 03:17:57 +00:00

18 lines
418 B
Java

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