]> source.dussan.org Git - aspectj.git/commitdiff
221558: test and fix: incorrect abstract method error with generics and ITDs
authoraclement <aclement>
Wed, 5 Mar 2008 23:31:16 +0000 (23:31 +0000)
committeraclement <aclement>
Wed, 5 Mar 2008 23:31:16 +0000 (23:31 +0000)
tests/bugs160/various/IncorrectMessage2.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java
tests/src/org/aspectj/systemtest/ajc160/ajc160.xml

diff --git a/tests/bugs160/various/IncorrectMessage2.java b/tests/bugs160/various/IncorrectMessage2.java
new file mode 100644 (file)
index 0000000..116e8cd
--- /dev/null
@@ -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();
+}
\ No newline at end of file
index 4d66e0c2af741847a4ace2ac6639544dfeb79373..29fd87422599cd562cab92330f0ce39615dd1b6c 100644 (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");}
        
index 92db7b0fc84752f4772da53d687fe05bdd2d8b58..bfc1c4c4671692d9f179548d777cf8f72256dd22 100644 (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)"/>