diff options
author | aclement <aclement> | 2005-11-08 11:08:54 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-11-08 11:08:54 +0000 |
commit | 6cb89d22cff49645245458802aef0b623c8b6c7c (patch) | |
tree | 61e0897316dd2fe2521b5cba8d8634dfedd6d436 | |
parent | 6a14356a3c279b5067819bb10fd520952d081278 (diff) | |
download | aspectj-6cb89d22cff49645245458802aef0b623c8b6c7c.tar.gz aspectj-6cb89d22cff49645245458802aef0b623c8b6c7c.zip |
final part of fix for pr115038
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeDeclaration.java | 5 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/ajc150.xml | 7 |
2 files changed, 4 insertions, 8 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeDeclaration.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeDeclaration.java index ef7ecdb7e..82e29fa6a 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeDeclaration.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeDeclaration.java @@ -357,13 +357,16 @@ public abstract class InterTypeDeclaration extends AjMethodDeclaration { if (rb instanceof TypeVariableBinding) { scope.problemReporter().signalError(sourceStart,sourceEnd, "Cannot make inter-type declarations on type variables, use an interface and declare parents"); + // to prevent disgusting cascading errors after this problem - lets null out what leads to them (pr105038) + this.arguments=null; + this.returnType=new SingleTypeReference(TypeReference.VOID,0L); + this.ignoreFurtherInvestigation=true; ReferenceBinding closestMatch = null; if (((TypeVariableBinding)rb).firstBound!=null) { closestMatch = ((TypeVariableBinding)rb).firstBound.enclosingType(); } rb = new ProblemReferenceBinding(rb.compoundName,closestMatch,0); - return; } diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml index e344bb546..a10ee734e 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml @@ -42,9 +42,6 @@ <ajc-test dir="bugs150" title="NPE in ensureScopeSetup"> <compile files="pr115038.aj" options="-1.5"> - <!-- fixme asc the 'static ref' messages are a bit poor and ought to be eliminated... --> - <message kind="error" line="2" text="Cannot make a static reference to the non-static type Observable"/> - <message kind="error" line="2" text="Cannot make a static reference to the non-static type Event"/> <message kind="error" line="2" text="Cannot make inter-type declarations on type variables"/> </compile> </ajc-test> @@ -89,12 +86,8 @@ <ajc-test dir="bugs150/pr113947/case1" title="maws generic aspect - 1"> <compile files="AbstractListSupport.java,AnotherItem.java,Item.java,LinkedList.java,LinkedListItem.java,ListItem.java,StringList.java" options="-1.5"> - <!-- the 'static ref' messages are a bit poor and ought to be eliminated... --> - <message kind="error" line="6" text="Cannot make a static reference to the non-static type M"/> <message kind="error" line="6" text="Cannot make inter-type declarations on type variables"/> - <message kind="error" line="8" text="Cannot make a static reference to the non-static type I"/> <message kind="error" line="8" text="Cannot make inter-type declarations on type variables"/> - <message kind="error" line="12" text="Cannot make a static reference to the non-static type M"/> <message kind="error" line="12" text="Cannot make inter-type declarations on type variables"/> </compile> </ajc-test> |