]> source.dussan.org Git - aspectj.git/commitdiff
fix and test for Bugzilla Bug 36110
authorjhugunin <jhugunin>
Sat, 12 Apr 2003 00:47:38 +0000 (00:47 +0000)
committerjhugunin <jhugunin>
Sat, 12 Apr 2003 00:47:38 +0000 (00:47 +0000)
   IllegalAccessError while accessing introduced variable / 1.1rc1

tests/ajcTests.xml
tests/bugs/interSpecials/p1/C.java [new file with mode: 0644]
tests/bugs/interSpecials/p2/A1.java [new file with mode: 0644]
tests/bugs/interSpecials/p2/A2.java [new file with mode: 0644]
tests/jimTests.xml

index 6d4fd67b9a8971da06b88af5cc0a321cd519d21b..6fd1413fa2ffe06b8a8a75a76595954121abcbd5 100644 (file)
     </ajc-test>
     
     <ajc-test dir="bugs" pr="28703" title="assert and pertarget crashes compiler">
-        <compile files="EnsureOverriding.java" options="-1.4"/>
+        <compile files="EnsureOverriding.java" options="-source14"/>
         <run class="EnsureOverriding" vm="1.4"/>
     </ajc-test>
     
         </compile>
     </ajc-test>
     
-
     <ajc-test dir="options/injars/simple"  pr="35865"
       title="options -injars checking declare parents interactions">
         <compile files="DecParents.java,main.jar"
         <run class="DecParents"/>
     </ajc-test>
     
+    <ajc-test dir="bugs/interSpecials" title="IllegalAccessError while accessing introduced variable / 1.1rc1"
+      pr="36110">
+        <compile files="p1/C.java,p2/A1.java"/>
+        <run class="p2.A1"/>
+    </ajc-test>
+    
+    <ajc-test dir="bugs/interSpecials" title="testing that assert works like .class"
+      pr="36110">
+        <compile files="p1/C.java,p2/A2.java" options="-source14"/>
+        <run class="p2.A2" vm="1.4"/>
+    </ajc-test>
+    
 </suite>
diff --git a/tests/bugs/interSpecials/p1/C.java b/tests/bugs/interSpecials/p1/C.java
new file mode 100644 (file)
index 0000000..472afd8
--- /dev/null
@@ -0,0 +1,4 @@
+package p1;
+
+public class C {
+}
\ No newline at end of file
diff --git a/tests/bugs/interSpecials/p2/A1.java b/tests/bugs/interSpecials/p2/A1.java
new file mode 100644 (file)
index 0000000..4a84e59
--- /dev/null
@@ -0,0 +1,15 @@
+package p2;
+
+import p1.C;
+
+public class A1 {
+       public static void main(String[] args) {
+               new C().foo();
+       }
+}
+
+aspect InterClass {
+       void C.foo() {
+               System.out.println("class: " + C.class);
+       }
+}
\ No newline at end of file
diff --git a/tests/bugs/interSpecials/p2/A2.java b/tests/bugs/interSpecials/p2/A2.java
new file mode 100644 (file)
index 0000000..a29f3d5
--- /dev/null
@@ -0,0 +1,14 @@
+package p2;
+
+import p1.C;
+public class A2 {
+       public static void main(String[] args) {
+               new C().foo();
+       }
+}
+
+aspect InterClass {
+       void C.foo() {
+               assert(C.class != null);
+       }
+}
index cc3257d9f51b12c474151c9b0793afa5260e8d99..3f20da53f8e151afb9eec9c3276a592c3e0377aa 100644 (file)
@@ -1,6 +1,16 @@
 <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd">
 <suite>    
 
+    <ajc-test dir="bugs/interSpecials" title="IllegalAccessError while accessing introduced variable / 1.1rc1"
+      pr="36110">
+        <compile files="p1/C.java,p2/A1.java"/>
+        <run class="p2.A1"/>
+    </ajc-test>
+    <ajc-test dir="bugs/interSpecials" title="testing that assert works like .class"
+      pr="36110">
+        <compile files="p1/C.java,p2/A2.java" options="-source14"/>
+        <run class="p2.A2" vm="1.4"/>
+    </ajc-test>
     <!--
     
     <ajc-test dir="new" pr="885"