jdk-24/test/langtools/tools/javac/staticQualifiedNew/StaticQualifiedNew.java

16 lines
326 B
Java
Raw Normal View History

2007-12-01 00:00:00 +00:00
/*
* @test /nodynamiccopyright/
2007-12-01 00:00:00 +00:00
* @bug 4295650
* @summary Verify that qualified 'new' of static class is forbidden.
* @author maddox (after gbracha)
* @compile/fail/ref=StaticQualifiedNew.out -XDrawDiagnostics StaticQualifiedNew.java
2007-12-01 00:00:00 +00:00
*/
import p2.X;
class StaticQualifiedNew extends X {
X.M m2 = new X().new M();
}