summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-09-12 14:24:55 +0000
committeracolyer <acolyer>2005-09-12 14:24:55 +0000
commit776613eebf410baacd178bf73f3de0783f5df98f (patch)
treeb136dba761398cf56941f722414a0fc93917ea0c
parent2ae4f531c7f7c3c38c983c73492ef63b224784e3 (diff)
downloadaspectj-776613eebf410baacd178bf73f3de0783f5df98f.tar.gz
aspectj-776613eebf410baacd178bf73f3de0783f5df98f.zip
tests and fix for pr105181, implicit cast of itd field type on return from generic collection erroneously casting to aspect (declaring) type, not owning (target) type.
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeFieldBinding.java5
-rw-r--r--org.eclipse.jdt.core/jdtcore-for-aspectj-src.zipbin3703593 -> 3704782 bytes
-rw-r--r--org.eclipse.jdt.core/jdtcore-for-aspectj.jarbin5191274 -> 5207646 bytes
-rw-r--r--tests/bugs150/pr105181.aj10
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java11
5 files changed, 19 insertions, 7 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeFieldBinding.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeFieldBinding.java
index df5b255d3..b2f0f0569 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeFieldBinding.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeFieldBinding.java
@@ -112,5 +112,10 @@ public class InterTypeFieldBinding extends FieldBinding {
public ReferenceBinding getTargetType() {
return targetType;
}
+
+ // overrides ITD'd method in FieldBinding...
+ public ReferenceBinding getOwningClass() {
+ return targetType;
+ }
}
diff --git a/org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip b/org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip
index 2cb7b2bd3..4a5736a8f 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 2c246f462..bf98438ee 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/bugs150/pr105181.aj b/tests/bugs150/pr105181.aj
index 6ac65726b..4d83928b2 100644
--- a/tests/bugs150/pr105181.aj
+++ b/tests/bugs150/pr105181.aj
@@ -21,4 +21,14 @@ public class pr105181 {
*/
Foo f2 = source.get(0).foo();
}
+
+ public void worksOK() {
+ java.util.Vector<Bar> source = new java.util.Vector<Bar>();
+ source.add(new Bar());
+ Bar b = source.get(0).field;
+ }
+}
+
+class Bar {
+ Bar field;
} \ No newline at end of file
diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
index 246acc9c7..786716645 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
@@ -405,7 +405,7 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
public void testSuperCallInITD() {
runTest("super call in ITD");
}
-
+
public void testSuperCallInITDPart2() {
runTest("super call in ITD - part 2");
}
@@ -426,12 +426,9 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
runTest("cant find type error with generic return type or parameter");
}
-
-
-// currently failing...
-// public void testNoVerifyErrorOnGenericCollectionMemberAccess() {
-// runTest("no verify error on generic collection member access");
-// }
+ public void testNoVerifyErrorOnGenericCollectionMemberAccess() {
+ runTest("no verify error on generic collection member access");
+ }
// helper methods.....