Browse Source

221558: test and fix: incorrect abstract method error with generics and ITDs

tags/V1_6_0rc1
aclement 16 years ago
parent
commit
97e2ffa40e

+ 14
- 0
tests/bugs160/various/IncorrectMessage2.java View File

@@ -0,0 +1,14 @@

class Foo<A> extends FooBase implements Marker<A> { }

interface Marker<A> { }

aspect AspectDoWhatEver {
void Marker<A>.doWhatEver() { // do nothing
}
}

abstract class FooBase
{
abstract void doWhatEver();
}

+ 1
- 0
tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java View File

@@ -22,6 +22,7 @@ public class Ajc160Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
// AspectH1.6.0rc1
public void testBadMessage() { runTest("incorrect itd error with generics");}
public void testBadMessage2() { runTest("incorrect itd error with generics - 2");}
public void testHasMethodAnnoValueInt_various() { runTest("hasmethod anno value - I");}
public void testHasMethodAnnoValueBoolean_various() { runTest("hasmethod anno value - Z");}

+ 12
- 1
tests/src/org/aspectj/systemtest/ajc160/ajc160.xml View File

@@ -5,9 +5,20 @@


<ajc-test dir="bugs160/various" title="incorrect itd error with generics">
<compile options="-1.5 -showWeaveInfo" files="IncorrectMessage.java"/>
<compile options="-1.5 -showWeaveInfo" files="IncorrectMessage.java">
<message kind="weave" text="Type 'Foo' (IncorrectMessage.java) has intertyped method from 'AspectDoWhatEver' (IncorrectMessage.java:'void Marker.doWhatEver()')"/>
<message kind="weave" text="Type 'Marker' (IncorrectMessage.java) has intertyped method from 'AspectDoWhatEver' (IncorrectMessage.java:'void Marker.doWhatEver()')"/>
</compile>
</ajc-test>
<ajc-test dir="bugs160/various" title="incorrect itd error with generics - 2">
<compile options="-1.5 -showWeaveInfo" files="IncorrectMessage2.java">
<message kind="weave" text="Type 'Foo' (IncorrectMessage2.java) has intertyped method from 'AspectDoWhatEver' (IncorrectMessage2.java:'void Marker.doWhatEver()')"/>
<message kind="weave" text="Type 'Marker' (IncorrectMessage2.java) has intertyped method from 'AspectDoWhatEver' (IncorrectMessage2.java:'void Marker.doWhatEver()')"/>
</compile>
</ajc-test>
<ajc-test dir="bugs160/various" title="hasmethod anno value - I">
<compile options="-1.5 -XhasMember -showWeaveInfo" files="A.java">
<message kind="weave" text="Extending interface set for type 'B' (A.java) to include 'java.io.Serializable' (A.java)"/>

Loading…
Cancel
Save