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

18 lines
369 B
Java
Raw Normal View History

2007-12-01 00:00:00 +00:00
/*
* @test /nodynamiccopyright/
* @bug 4406966 6969184
2007-12-01 00:00:00 +00:00
* @summary null qualifying inner instance creation should be error.
* @author gafter
*
* @compile/fail/ref=QualifiedNew.out -XDrawDiagnostics QualifiedNew.java
2007-12-01 00:00:00 +00:00
*/
class QualifiedNew {
class Y {}
class Z {
Y[] a;
Object tmp1 = null.new Y();
Object tmp2 = a.new Y();
}
}