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

17 lines
361 B
Java
Raw Normal View History

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