]> source.dussan.org Git - aspectj.git/commitdiff
315398: remove dirty hack from the olden days
authoraclement <aclement>
Thu, 28 Apr 2011 18:06:21 +0000 (18:06 +0000)
committeraclement <aclement>
Thu, 28 Apr 2011 18:06:21 +0000 (18:06 +0000)
tests/bugs1612/pr315398/Code2.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/Code2.java b/tests/bugs1612/pr315398/Code2.java
new file mode 100644 (file)
index 0000000..d189315
--- /dev/null
@@ -0,0 +1,19 @@
+public aspect Code2 {
+
+  static int[] a = new int[]{1,2,3};
+
+  static void f(){
+    new Test(a[0]++);
+}
+
+after() returning(Object obj) : call(Test.new(..)) {
+}
+
+  public static void main(String []argv) {
+   f();
+ }
+}
+
+class Test {
+  Test(int i) {}
+}
index 7cb96b01f1d81458cdfc23e0c9fece9ce15806af..9b706a1a7ecab1b394fe20f983a80cc238e8fc34 100644 (file)
@@ -25,6 +25,10 @@ public class Ajc1612Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
                runTest("verifyerror");
        }
        
+       public void testVerifyError_315398_2() {
+               runTest("verifyerror - 2");
+       }
+       
        public void testRawTypePointcut_327134() {
                runTest("rawtype pointcut");
        }
index 6113a9c8a8ac212f5fb4c65d9de8473505349ca5..0609e0922edac0ca594ced8471ae167d4d91fab7 100644 (file)
 </stdout></run>
 </ajc-test>
 
+<ajc-test dir="bugs1612/pr315398" title="verifyerror - 2">
+<compile files="Code2.java" options="-1.5">
+</compile>
+<run class="Code2"></run>
+</ajc-test>
+
 <ajc-test dir="bugs1612/pr335810" title="rawtype warning">
 <compile files="One.java" options="-1.5 -warn:+raw -warn:+warningToken">
 </compile>