]> source.dussan.org Git - aspectj.git/commitdiff
final part of fix for pr115038
authoraclement <aclement>
Tue, 8 Nov 2005 11:08:54 +0000 (11:08 +0000)
committeraclement <aclement>
Tue, 8 Nov 2005 11:08:54 +0000 (11:08 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeDeclaration.java
tests/src/org/aspectj/systemtest/ajc150/ajc150.xml

index ef7ecdb7e94a93fa3e79cd1aa05c00c8e15544f9..82e29fa6a7e08eeaa61b94a65b719f1ed1d2b8b7 100644 (file)
@@ -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;
                }
 
                
index e344bb54694af32f46522bb47fb0d6d235c4a465..a10ee734e0688cc91a49304048fda1cacff54330 100644 (file)
@@ -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>
     
     <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>