]> source.dussan.org Git - aspectj.git/commitdiff
tests for pr59397, synthetic ITC arg confusing matching
authoracolyer <acolyer>
Thu, 1 Sep 2005 12:39:40 +0000 (12:39 +0000)
committeracolyer <acolyer>
Thu, 1 Sep 2005 12:39:40 +0000 (12:39 +0000)
tests/bugs150/pr59397.aj [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc120/ajc120-tests.xml
tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
tests/src/org/aspectj/systemtest/ajc150/ajc150.xml

diff --git a/tests/bugs150/pr59397.aj b/tests/bugs150/pr59397.aj
new file mode 100644 (file)
index 0000000..a8c157c
--- /dev/null
@@ -0,0 +1,6 @@
+aspect A {  
+    HW.new(String s) {}  
+    declare warning : initialization(HW.new(String,A)) : "should not match";
+    declare warning : initialization(HW.new(String)) : "should match";
+}
+class HW {}
\ No newline at end of file
index 8381d4e017b8beaecc7d40dee59208639327944c..982a8934d4efeeca9a37806578d9529241a7bf26 100644 (file)
        pr="59397"
                title="NPE in compiler when using (an unusual) declare warning against a ctor ITD">
         <compile files="DecwInitializationITD.java">
-               <message kind="warning" line="16"/>
         </compile>
     </ajc-test>
        
index b2d388181b8f1c6d8f1df7d78266c52ef854e5df..38e4ded22842f1f6ea8a86c4feb8cc6d6962b180 100644 (file)
@@ -354,6 +354,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
          runTest("no unused warnings on aspect types");
   }
   
+  public void testSyntheticArgumentsOnITDConstructorsNotUsedInMatching() {
+         runTest("synthetic arguments on itd cons are not used in matching");
+  }
+  
   // helper methods.....
   
   public SyntheticRepository createRepos(File cpentry) {
index f3e301cec8b76c132fa8578def53551ed4f4a525..1450fda38c14d743280c62a60c59bc961416c8f9 100644 (file)
         <compile files="pr74048.aj" options="-warn:unusedPrivate"/>
     </ajc-test>  
   
+    <ajc-test dir="bugs150" pr="59397" title="synthetic arguments on itd cons are not used in matching">
+        <compile files="pr59397.aj">
+            <message line="6" kind="warning" text="should match"/>
+        </compile>
+    </ajc-test>  
+  
     <!-- ============================================================================ -->
     <!-- ============================================================================ -->