summaryrefslogtreecommitdiffstats
path: root/org.aspectj.matcher/src
diff options
context:
space:
mode:
authoraclement <aclement>2008-12-09 00:20:23 +0000
committeraclement <aclement>2008-12-09 00:20:23 +0000
commit1ee5cebaebb381778cb15806fc5a9f25d7d8bf5b (patch)
treeb6cd16576be592960cde9405c4d9e644ba512fda /org.aspectj.matcher/src
parent0b20da91288f47daa9c9860b5186782d1da4007b (diff)
downloadaspectj-1ee5cebaebb381778cb15806fc5a9f25d7d8bf5b.tar.gz
aspectj-1ee5cebaebb381778cb15806fc5a9f25d7d8bf5b.zip
253109: tests and fix
Diffstat (limited to 'org.aspectj.matcher/src')
-rw-r--r--org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java22
1 files changed, 19 insertions, 3 deletions
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java b/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
index 4ce3562e8..1eb06cc90 100644
--- a/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
+++ b/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
@@ -216,6 +216,14 @@ public class ReferenceType extends ResolvedType {
return isCoerceableFromParameterizedType(other);
}
+ if (this.isParameterizedType() && other.isRawType()) {
+ return ((ReferenceType) this.getRawType()).isCoerceableFrom(other.getGenericType());
+ }
+
+ if (this.isRawType() && other.isParameterizedType()) {
+ return this.getGenericType().isCoerceableFrom(((ReferenceType) other.getRawType()));
+ }
+
if (!this.isInterface() && !other.isInterface()) {
return false;
}
@@ -302,14 +310,17 @@ public class ReferenceType extends ResolvedType {
if (ResolvedType.validBoxing.contains(this.getSignature() + other.getSignature()))
return true;
}
- if (this == other)
+ if (this == other) {
return true;
- if (this.getSignature().equals(ResolvedType.OBJECT.getSignature()))
+ }
+ if (this.getSignature().equals(ResolvedType.OBJECT.getSignature())) {
return true;
+ }
if ((this.isRawType() || this.isGenericType()) && other.isParameterizedType()) {
- if (isAssignableFrom((ResolvedType) other.getRawType()))
+ if (isAssignableFrom((ResolvedType) other.getRawType())) {
return true;
+ }
}
if (this.isRawType() && other.isGenericType()) {
if (isAssignableFrom((ResolvedType) other.getRawType()))
@@ -319,6 +330,11 @@ public class ReferenceType extends ResolvedType {
if (isAssignableFrom(other.getGenericType()))
return true;
}
+ // if (this.isParameterizedType() && other.isRawType()) {
+ // if (((ReferenceType) this.getRawType()).isAssignableFrom(other.getGenericType())) {
+ // return true;
+ // }
+ // }
if (this.isParameterizedType()) {
// look at wildcards...