diff -r 000000000000 -r 9a66ca7c79fa test/tools/javac/NonStaticFieldExpr3.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/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 +}