]> source.dussan.org Git - aspectj.git/commitdiff
298665: testcode
authoraclement <aclement>
Mon, 22 Mar 2010 22:03:43 +0000 (22:03 +0000)
committeraclement <aclement>
Mon, 22 Mar 2010 22:03:43 +0000 (22:03 +0000)
tests/bugs169/pr298665/A.java [new file with mode: 0644]
tests/bugs169/pr298665/Main.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java

diff --git a/tests/bugs169/pr298665/A.java b/tests/bugs169/pr298665/A.java
new file mode 100644 (file)
index 0000000..28d7438
--- /dev/null
@@ -0,0 +1,8 @@
+import java.util.*;
+
+public class A<? extends M> {
+  public void foo(List<?> m) {}
+}
+class B extends A {
+  public void foo(List<? extends Object> m) {}
+}
diff --git a/tests/bugs169/pr298665/Main.java b/tests/bugs169/pr298665/Main.java
new file mode 100644 (file)
index 0000000..4a6cfaa
--- /dev/null
@@ -0,0 +1,29 @@
+aspect MyAspect
+{
+   public interface MyInterface
+   {
+       public boolean instanceOf(Class<? extends Object> c);
+       //public boolean instanceOf(Class c);
+   }
+
+   declare parents: MyObject implements MyInterface;
+
+   public boolean MyInterface.instanceOf(Class<? extends Object> c)
+   //public boolean MyInterface.instanceOf(Class c)
+   {
+       return c.isInstance(this);
+   }
+}
+
+class MyObject
+{
+  // public boolean instanceOf(Class<? extends Object> c) {return true;}
+}
+
+public class Main
+{
+   public static void main(String[] args)
+   {
+       new MyObject().instanceOf(Object.class);
+   }
+}
index 640a2b56a173d62d3f194a449534e0ddfac8e60c..5953efbca2430c60c156f3cd0a15620686027b35 100644 (file)
@@ -18,9 +18,9 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
 
 public class Ajc169Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
 
-       //public void testStaticallyAnalyzableIf_292262_1() {
-       //      runTest("if with statically recognizable code");
-       //}
+       // public void testStaticallyAnalyzableIf_292262_1() {
+       // runTest("if with statically recognizable code");
+       // }
 
        public void testTypePatternCategories_44365_Class() {
                runTest("type category type patterns - class");
@@ -70,9 +70,9 @@ public class Ajc169Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
                runTest("type category type patterns - e2");
        }
 
-       /*
-        * public void testAmbiguousMethod() { runTest("ambiguous method"); }
-        */
+       // public void testAmbiguousMethod_298665() {
+       // runTest("ambiguous method");
+       // }
 
        public void testChecker() {
                runTest("inserts in messages");