]> source.dussan.org Git - aspectj.git/commitdiff
315398
authoraclement <aclement>
Thu, 28 Apr 2011 17:55:43 +0000 (17:55 +0000)
committeraclement <aclement>
Thu, 28 Apr 2011 17:55:43 +0000 (17:55 +0000)
tests/bugs1612/pr315398/Code.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java
tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml

diff --git a/tests/bugs1612/pr315398/Code.java b/tests/bugs1612/pr315398/Code.java
new file mode 100644 (file)
index 0000000..22e6f1a
--- /dev/null
@@ -0,0 +1,22 @@
+public aspect Code {
+
+  static int[] a = new int[]{1,2,3};
+
+  static void f(){
+    System.out.println(a[0]);
+    new Test(a[0]++);
+    System.out.println(a[0]);
+  }
+
+  before(): call(Test.new(..)) {
+    System.out.println("advice");
+  }
+
+  public static void main(String []argv) {
+   f();
+ }
+}
+
+class Test {
+  Test(int i) {}
+}
index a3cb6108d0927d96216159c308ea034dee19a02f..7cb96b01f1d81458cdfc23e0c9fece9ce15806af 100644 (file)
@@ -21,6 +21,10 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
  */
 public class Ajc1612Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
 
+       public void testVerifyError_315398() {
+               runTest("verifyerror");
+       }
+       
        public void testRawTypePointcut_327134() {
                runTest("rawtype pointcut");
        }
index a413a1232cd7da6080b782cb5dfb06b426411335..6113a9c8a8ac212f5fb4c65d9de8473505349ca5 100644 (file)
@@ -2,6 +2,17 @@
 
 <suite>
 
+<ajc-test dir="bugs1612/pr315398" title="verifyerror">
+<compile files="Code.java" options="-1.5">
+</compile>
+<run class="Code">
+<stdout>
+<line text="1"/>
+<line text="advice"/>
+<line text="2"/>
+</stdout></run>
+</ajc-test>
+
 <ajc-test dir="bugs1612/pr335810" title="rawtype warning">
 <compile files="One.java" options="-1.5 -warn:+raw -warn:+warningToken">
 </compile>