]> source.dussan.org Git - aspectj.git/commitdiff
more bridge method testcode.
authoraclement <aclement>
Thu, 10 Nov 2005 12:19:07 +0000 (12:19 +0000)
committeraclement <aclement>
Thu, 10 Nov 2005 12:19:07 +0000 (12:19 +0000)
tests/java5/generics/binaryBridging/TwoA.java [new file with mode: 0644]
tests/java5/generics/binaryBridging/TwoB.java [new file with mode: 0644]
tests/java5/generics/binaryBridging/TwoX.java [new file with mode: 0644]
tests/java5/generics/binaryBridging/readme.txt
tests/src/org/aspectj/systemtest/ajc150/ajc150.xml

diff --git a/tests/java5/generics/binaryBridging/TwoA.java b/tests/java5/generics/binaryBridging/TwoA.java
new file mode 100644 (file)
index 0000000..f375b38
--- /dev/null
@@ -0,0 +1,8 @@
+import java.util.*;
+import java.io.*;
+
+public class TwoA<T extends Serializable> {
+
+  public Number firstMethod(T t) { return null;}
+
+}
diff --git a/tests/java5/generics/binaryBridging/TwoB.java b/tests/java5/generics/binaryBridging/TwoB.java
new file mode 100644 (file)
index 0000000..6f22f1d
--- /dev/null
@@ -0,0 +1,7 @@
+import java.util.*;
+
+public class TwoB /* extends TwoA<String>*/ {
+
+  public Integer firstMethod(String s) { return null;}
+
+}
diff --git a/tests/java5/generics/binaryBridging/TwoX.java b/tests/java5/generics/binaryBridging/TwoX.java
new file mode 100644 (file)
index 0000000..bf375d3
--- /dev/null
@@ -0,0 +1,3 @@
+public aspect TwoX {
+  declare parents: TwoB implements TwoA<String>;
+}
index bd84553ed279e62cd20d65fb9c8a05981b9b1860..b5a28756e225db57a1d19333878d4e8258233aab 100644 (file)
@@ -2,4 +2,4 @@ Tests that if binary weaving then we create the right bridge methods.
 
 Test One: Using decp to wire together two types - a generic type that has a bunch of methods that use type variables and a second type that is told to implement a parameterization of the generic type with the decp.
 
-
+Test Two: Now the horrific method in the supertype is overridden by a combination of covariance and parameterization.
index 2047ebc4c86c43911678ec6d9e20cb5ff1aaa9ad..80492b8783999b25d4d0a41ebfd22b673c47a50a 100644 (file)
      <compile files="OneX.java" inpath="onea.jar;oneb.jar" options="-1.5"/>
    </ajc-test>
       
-
+   <ajc-test dir="java5/generics/binaryBridging" title="binary bridge methods - two">
+     <compile files="TwoA.java" outjar="twoa.jar" options="-1.5"/>
+     <compile files="TwoB.java" outjar="twob.jar" options="-1.5"/>
+     <compile files="TwoX.java" inpath="twoa.jar;twob.jar" options="-1.5"/>
+   </ajc-test>
 
    <ajc-test dir="java5/generics/itds/bridgeMethods" vm="1.5" title="abstract intertype methods and covariant returns">
           <compile files="pr91381.aj" options="-1.5"/>