test/tools/javac/NonStaticFieldExpr1.java

Thu, 15 Jul 2010 16:31:02 +0100

author
mcimadamore
date
Thu, 15 Jul 2010 16:31:02 +0100
changeset 607
b49b0d72c071
parent 69
82c7aa6fe50a
child 611
4172cfff05f0
permissions
-rw-r--r--

6967002: JDK7 b99 javac compilation error (java.lang.AssertionError)
Summary: bug in JavacParser related to parsing of type annotations in varargs position
Reviewed-by: jjg
Contributed-by: mahmood@notnoop.com

duke@1 1 /* @test /nodynamiccopyright/
duke@1 2 @bug 4087127 4785453
duke@1 3 @author dps
duke@1 4 @summary field: instance access through types is not allowed
duke@1 5
jjg@69 6 @compile/fail/ref=NonStaticFieldExpr1.out -XDrawDiagnostics -XDstdout NonStaticFieldExpr1.java
duke@1 7 */
duke@1 8 class NonStaticFieldExpr1 {
duke@1 9 public int x;
duke@1 10 int y = NonStaticFieldExpr1.x; // SHOULD BE ERROR
duke@1 11 }

mercurial