diff options
author | aclement <aclement> | 2009-06-17 22:27:13 +0000 |
---|---|---|
committer | aclement <aclement> | 2009-06-17 22:27:13 +0000 |
commit | 60c1f1ca927f1a3b5fbac21f1781c34355f662a6 (patch) | |
tree | 854dacae1edfe7c3e3c6aeead8f89c4062ef29bd /org.aspectj.matcher | |
parent | fa352eb9f1b0335b01a8b6a90249cd3a03dba4c5 (diff) | |
download | aspectj-60c1f1ca927f1a3b5fbac21f1781c34355f662a6.tar.gz aspectj-60c1f1ca927f1a3b5fbac21f1781c34355f662a6.zip |
280676: problem 2: allow for target not being generic
Diffstat (limited to 'org.aspectj.matcher')
-rw-r--r-- | org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java index 9ecf4fc4b..ab7f75f91 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java @@ -1410,9 +1410,16 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl if (debug) System.err.println(" Signature that needs parameterizing: " + member); // Retrieve the generic type - ResolvedType onType = world.resolve(member.getDeclaringType()).getGenericType(); - member.resolve(world); // Ensure all parts of the member are - // resolved + ResolvedType onTypeResolved = world.resolve(member.getDeclaringType()); + ResolvedType onType = onTypeResolved.getGenericType(); + if (onType == null) { + // The target is not generic + getWorld().getMessageHandler().handleMessage( + MessageUtil.error("The target type for the intertype declaration is not generic", munger + .getSourceLocation())); + return munger; + } + member.resolve(world); // Ensure all parts of the member are resolved if (debug) System.err.println(" Actual target ontype: " + onType + " (" + onType.typeKind + ")"); // quickly find the targettype in the type hierarchy for this type |