Quellcode durchsuchen

final part of fix for pr115038

tags/V1_5_0RC1
aclement vor 18 Jahren
Ursprung
Commit
6cb89d22cf

+ 4
- 1
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeDeclaration.java Datei anzeigen

@@ -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;
}


+ 0
- 7
tests/src/org/aspectj/systemtest/ajc150/ajc150.xml Datei anzeigen

@@ -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>

Laden…
Abbrechen
Speichern