]> source.dussan.org Git - aspectj.git/commitdiff
332388: test and fix
authoraclement <aclement>
Mon, 13 Dec 2010 20:31:12 +0000 (20:31 +0000)
committeraclement <aclement>
Mon, 13 Dec 2010 20:31:12 +0000 (20:31 +0000)
tests/bugs1611/pr332388_2/A.java [new file with mode: 0644]
tests/bugs1611/pr332388_2/M.java [new file with mode: 0644]
tests/bugs1611/pr332388_2/MyAspect.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc1611/Ajc1611Tests.java
tests/src/org/aspectj/systemtest/ajc1611/ajc1611.xml

diff --git a/tests/bugs1611/pr332388_2/A.java b/tests/bugs1611/pr332388_2/A.java
new file mode 100644 (file)
index 0000000..75835bc
--- /dev/null
@@ -0,0 +1,6 @@
+public class A<T> {
+  public void a(Class<? extends M> list) {}
+  public void x() {
+    a(null);
+  }
+}
diff --git a/tests/bugs1611/pr332388_2/M.java b/tests/bugs1611/pr332388_2/M.java
new file mode 100644 (file)
index 0000000..9b4658f
--- /dev/null
@@ -0,0 +1 @@
+public class M {}
diff --git a/tests/bugs1611/pr332388_2/MyAspect.java b/tests/bugs1611/pr332388_2/MyAspect.java
new file mode 100644 (file)
index 0000000..9252d17
--- /dev/null
@@ -0,0 +1,9 @@
+import org.aspectj.lang.annotation.*;
+
+@Aspect
+public class MyAspect {
+  @Before("call(* *.*(..)) && target(x)")
+  public void myAdvice(CharSequence x) {
+    System.out.println();
+  }
+}
index 75a4f51cff4e7539761da2688e13ee8f970be8b6..408ebb02d93834120388cf6a7bd54a308d273e44 100644 (file)
@@ -25,6 +25,10 @@ public class Ajc1611Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
                runTest("pr332388");
        }
 
+       public void testMissingType_332388_2() {
+               runTest("pr332388 - 2");
+       }
+
        public void testDeclareField_328840() {
                runTest("pr328840");
        }
index 58be6e641249d46d918d341cd8144c2ac4264f10..56434cff6f563849848ed0b3c96e1f7298c59855 100644 (file)
      </compile>
   </ajc-test>
   
+  <ajc-test dir="bugs1611/pr332388_2" title="pr332388 - 2">
+     <compile files="M.java" outjar="M.jar" options="-1.5"/>
+     <compile files="A.java" classpath="M.jar" outjar="A.jar" options="-1.5"/>
+     <compile files="MyAspect.java" outjar="aspects.jar" options="-1.5"/>
+     <compile files="" aspectpath="aspects.jar" inpath="A.jar" options="-1.5">
+     <message kind="error" text="Unable to find type (for bound): M"/>
+     </compile>
+  </ajc-test>
+  
 </suite>
\ No newline at end of file