langtools/test/tools/javac/NonStaticFieldExpr3.java
changeset 10 06bc494ca11e
child 863 3113c955a388
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/NonStaticFieldExpr3.java	Sat Dec 01 00:00:00 2007 +0000
@@ -0,0 +1,15 @@
+/* @test  /nodynamiccopyright/
+   @bug 4087127 4785453
+   @author dps
+   @summary class: instance access through types is not allowed
+
+   @run shell NonStaticFieldExpr3.sh
+*/
+
+class NonStaticFieldExpr3 {
+  public int x;
+}
+
+class Subclass extends NonStaticFieldExpr3 {
+  int a = NonStaticFieldExpr3.x;      // SHOULD BE ERROR
+}