]> source.dussan.org Git - aspectj.git/commitdiff
218167: test and fix: compiler crash on multiple dec @fields
authoraclement <aclement>
Thu, 7 Feb 2008 17:00:27 +0000 (17:00 +0000)
committeraclement <aclement>
Thu, 7 Feb 2008 17:00:27 +0000 (17:00 +0000)
tests/bugs160/pr218167/Test.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/pr218167/Test.java b/tests/bugs160/pr218167/Test.java
new file mode 100644 (file)
index 0000000..33d32e6
--- /dev/null
@@ -0,0 +1,14 @@
+@interface A {}
+
+aspect Test {
+        declare @field : @A int var* : @A;
+        declare @field : int var* : @A;
+
+        interface Subject {}
+
+        public int Subject.vara;
+        public int Subject.varb;
+}
+
+class X implements Test.Subject {
+}
\ No newline at end of file
index 8d558576f74145eeab4d4b0965a52eab4c3d07d0..4e5aa1eead8657e2fcde3ceedf033b354e1ebd1a 100644 (file)
@@ -20,6 +20,7 @@ import junit.framework.Test;
  */
 public class Ajc160Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
        
+       public void testDecFieldProblem_pr218167() { runTest("dec field problem");}
        public void testGenericsSuperITD_pr206911() { runTest("generics super itd"); }
        public void testGenericsSuperITD_pr206911_2() { runTest("generics super itd - 2"); }
 
index 92cd0fd66a05746b00badf61625ba0d0c9118d31..ee5e641379ca6b6bb19cbe91ba14d2762fe34df4 100644 (file)
@@ -3,6 +3,12 @@
 <!-- AspectJ v1.6.0 Tests -->
 <suite>
 
+   <ajc-test dir="bugs160/pr218167" title="dec field problem">
+     <compile options="-1.5" files="Test.java">
+       <message kind="warning" text="already has an annotation of type A, cannot add a second instance"/>
+     </compile>
+   </ajc-test>
+
    <ajc-test dir="bugs160/pr206911" title="generics super itd">
      <compile options="-1.5" files="VerifyError.java"/>
      <run class="bugs.VerifyError"/>