aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoracolyer <acolyer>2004-08-10 16:26:24 +0000
committeracolyer <acolyer>2004-08-10 16:26:24 +0000
commitc5d8476b232fa84f766a1a84d1ab45ad8e3867b8 (patch)
treebcc69f27d0f107412310974e77d7c79b70e9ccc4
parentb75cd93e0de66996397e9f18809973abec91fe46 (diff)
downloadaspectj-c5d8476b232fa84f766a1a84d1ab45ad8e3867b8.tar.gz
aspectj-c5d8476b232fa84f766a1a84d1ab45ad8e3867b8.zip
fix for Bugzilla Bug 61572
ITDs on inner classes should be static contexts
-rw-r--r--org.eclipse.jdt.core/jdtcore-for-aspectj-src.zipbin3832332 -> 3813341 bytes
-rw-r--r--org.eclipse.jdt.core/jdtcore-for-aspectj.jarbin4279739 -> 4279581 bytes
-rw-r--r--tests/bugs/PR61572.aj44
3 files changed, 44 insertions, 0 deletions
diff --git a/org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip b/org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip
index 98dfa8800..34c57f137 100644
--- a/org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip
+++ b/org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip
Binary files differ
diff --git a/org.eclipse.jdt.core/jdtcore-for-aspectj.jar b/org.eclipse.jdt.core/jdtcore-for-aspectj.jar
index c0d1e166b..e0e8c9701 100644
--- a/org.eclipse.jdt.core/jdtcore-for-aspectj.jar
+++ b/org.eclipse.jdt.core/jdtcore-for-aspectj.jar
Binary files differ
diff --git a/tests/bugs/PR61572.aj b/tests/bugs/PR61572.aj
new file mode 100644
index 000000000..0f29c1303
--- /dev/null
+++ b/tests/bugs/PR61572.aj
@@ -0,0 +1,44 @@
+/* intertype method declarations should be a static context;
+it is incorrect to refer to instance variables of the
+originating aspect. ajc fails to check this properly when
+an ITD method is applied to an inner class.
+
+The example below compiles fine, but then throws
+
+java.lang.NoSuchFieldError: zzz
+
+when run.
+
+*/
+
+aspect NewFoo {
+
+ int zzz = 3;
+
+ public void Aaa.Ccc.bar() {
+ System.out.println(zzz); // CE L19: illegal reference to zzz
+ }
+}
+
+class Aaa {
+
+ public class Ccc {
+
+ }
+
+ public Ccc ccc;
+
+ public Aaa() {
+ ccc = new Ccc();
+ }
+}
+
+class IllegalRef {
+
+
+ public static void main(String[] args) {
+ Aaa aaa = new Aaa();
+ aaa.ccc.bar();
+ }
+
+} \ No newline at end of file