aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core
diff options
context:
space:
mode:
authoraclement <aclement>2004-10-19 10:37:31 +0000
committeraclement <aclement>2004-10-19 10:37:31 +0000
commit6beb43faeecff249a33e7d7e2489c6a92a4700fd (patch)
treeb31102f64c9d7a5df4eaea1dfbbcde01f207c8e9 /org.aspectj.ajdt.core
parentae186f2bb93f3a7c3834dfd0e6712d10af5fd6c7 (diff)
downloadaspectj-6beb43faeecff249a33e7d7e2489c6a92a4700fd.tar.gz
aspectj-6beb43faeecff249a33e7d7e2489c6a92a4700fd.zip
Fix for Bugzilla Bug 76096: Anonymous classes unaware of introductions into abstract classes (error can't find type $Local$)
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
index 61270166d..83117d409 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
@@ -15,6 +15,7 @@
import java.lang.reflect.Modifier;
import java.util.Iterator;
+import java.util.List;
import org.aspectj.ajdt.internal.compiler.ast.AdviceDeclaration;
import org.aspectj.ajdt.internal.compiler.ast.PointcutDeclaration;
@@ -156,7 +157,17 @@ public class AjProblemReporter extends ProblemReporter {
// if we implemented this method by an inter-type declaration, then there is no error
//??? be sure this is always right
- ResolvedTypeX onTypeX = factory.fromEclipse(type); //abstractMethod.declaringClass);
+ ResolvedTypeX onTypeX = null;
+
+ // If the type is anonymous, look at its supertype
+ if (!type.isAnonymousType()) {
+ onTypeX = factory.fromEclipse(type);
+ } else {
+ // Hmmm. If the ITD is on an interface that is being 'instantiated' using an anonymous type,
+ // we sort it out elsewhere and don't come into this method -
+ // so we don't have to worry about interfaces, just the superclass.
+ onTypeX = factory.fromEclipse(type.superclass()); //abstractMethod.declaringClass);
+ }
for (Iterator i = onTypeX.getInterTypeMungersIncludingSupers().iterator(); i.hasNext(); ) {
ConcreteTypeMunger m = (ConcreteTypeMunger)i.next();
ResolvedMember sig = m.getSignature();