spogulis no
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-08-27 05:54:38 +02:00
tests for pr62475 (disabled at present)
Šī revīzija ir iekļauta:
vecāks
bf261abb3a
revīzija
9d36a87c1f
28
tests/bugs/oxford/PR62475.java
Parasts fails
28
tests/bugs/oxford/PR62475.java
Parasts fails
@ -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);
|
||||
}
|
||||
|
||||
}
|
@ -149,5 +149,9 @@ public class Ajc121Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
|
||||
public void test027_itdsOnInnerClassesAsStatic() {
|
||||
runTest("ITDs on inner classes should be static context");
|
||||
}
|
||||
|
||||
// public void test028_itdsAndInitializers() {
|
||||
// runTest("resolution of IT field inits");
|
||||
// }
|
||||
}
|
||||
|
||||
|
@ -223,3 +223,11 @@
|
||||
<message kind="error" line="15" text="Ambiguous binding of type Test"/>
|
||||
</compile>
|
||||
</ajc-test>
|
||||
<!--
|
||||
<ajc-test dir="bugs/oxford" pr="62475"
|
||||
title="resolution of IT field inits">
|
||||
<compile files="PR62475.java">
|
||||
<message kind="error" line="14" />
|
||||
</compile>
|
||||
</ajc-test>
|
||||
-->
|
Notiek ielāde…
Atsaukties uz šo jaunā problēmā
Block a user