langtools/test/tools/javac/NonStaticFieldExpr2.java
author xdono
Wed, 02 Jul 2008 12:56:02 -0700
changeset 735 372aa565a221
parent 10 06bc494ca11e
child 863 3113c955a388
permissions -rw-r--r--
6719955: Update copyright year Summary: Update copyright year for files that have been modified in 2008 Reviewed-by: ohair, tbell

/* @test  /nodynamiccopyright/
   @bug 4087127 4785453
   @author dps
   @summary method: instance access through types is not allowed

   @run shell NonStaticFieldExpr2.sh
*/

class NonStaticFieldExpr2 {

  public int x;

  void foo () {
     int z = NonStaticFieldExpr2.x;     // SHOULD BE ERROR
  }
}