langtools/test/tools/javac/NonStaticFieldExpr1.java
author andrew
Thu, 03 Jun 2010 19:37:48 +0100
changeset 5639 730861c04a99
parent 863 3113c955a388
child 6150 d055fa8ced62
permissions -rw-r--r--
6958257: Add support for alpha Summary: Allow the Zero port to be built on alpha architectures Reviewed-by: ohair

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

   @compile/fail/ref=NonStaticFieldExpr1.out -XDrawDiagnostics -XDstdout NonStaticFieldExpr1.java
*/
class NonStaticFieldExpr1 {
  public int x;
  int y = NonStaticFieldExpr1.x;                // SHOULD BE ERROR
}