diff options
Diffstat (limited to 'tests/bugs/oxford/PR62475.java')
-rw-r--r-- | tests/bugs/oxford/PR62475.java | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/bugs/oxford/PR62475.java b/tests/bugs/oxford/PR62475.java new file mode 100644 index 000000000..3e29ffb0a --- /dev/null +++ b/tests/bugs/oxford/PR62475.java @@ -0,0 +1,28 @@ +/* +Intertype field initialisers should be resolved in the aspect +(lexical scope), for consistency with intertype method and +constructor bodies. + +The program below compiles without warning, however, binding z +to the z field of the target class. +*/ + + + +aspect Aspect { + + public int A.x = z; // CE L14 error: z not visible. + +} + +class A { + int z = 0; +} + +public class PR62475 { + + public static void main(String[] args) { +System.out.println(new A().x); + } + +}
\ No newline at end of file |