jdk-24/test/langtools/tools/javac/InterfaceInInner.java

18 lines
421 B
Java
Raw Normal View History

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