test/tools/javac/NonStaticFieldExpr2.java

Tue, 13 Jan 2009 13:28:42 +0000

author
mcimadamore
date
Tue, 13 Jan 2009 13:28:42 +0000
changeset 186
09eb1acc9610
parent 69
82c7aa6fe50a
child 611
4172cfff05f0
permissions
-rw-r--r--

6723444: javac fails to substitute type variables into a constructor's throws clause
Summary: Added constructor's actual type info to NewClass AST node
Reviewed-by: jjg
Contributed-by: mark@twistedbanana.demon.co.uk

     1 /* @test  /nodynamiccopyright/
     2    @bug 4087127 4785453
     3    @author dps
     4    @summary method: instance access through types is not allowed
     6    @compile/fail/ref=NonStaticFieldExpr2.out -XDrawDiagnostics -XDstdout NonStaticFieldExpr2.java
     7 */
     9 class NonStaticFieldExpr2 {
    11   public int x;
    13   void foo () {
    14      int z = NonStaticFieldExpr2.x;     // SHOULD BE ERROR
    15   }
    16 }

mercurial