]> source.dussan.org Git - aspectj.git/commitdiff
229910 - dont generate bad code for around advice on fieldset for an inherited field
authoraclement <aclement>
Fri, 2 May 2008 02:20:24 +0000 (02:20 +0000)
committeraclement <aclement>
Fri, 2 May 2008 02:20:24 +0000 (02:20 +0000)
tests/bugs161/pr229910/Test.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java
tests/src/org/aspectj/systemtest/ajc161/ajc161.xml

diff --git a/tests/bugs161/pr229910/Test.java b/tests/bugs161/pr229910/Test.java
new file mode 100644 (file)
index 0000000..139ce63
--- /dev/null
@@ -0,0 +1,31 @@
+public class Test {
+
+  public static void main(String[] argv) {
+    new Foo();
+  }
+
+}
+
+interface I {}
+
+abstract class AbstractFoo implements I {
+
+  String f;
+
+  AbstractFoo() {
+  }
+}
+
+class Foo extends AbstractFoo {
+
+  Foo() {
+    super();
+    f = "hello";
+  }
+}
+
+aspect X {
+
+ void around(): target(I) && set(* *) { proceed(); }
+
+}
index d9321b6aae217596a76ebc6a34945442149dfffe..8d1badc21f7b3a15e7d8c58f14a07c1cf5663845 100644 (file)
@@ -18,7 +18,8 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
 
 public class Ajc161Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
        
-       // AspectJ1.6.0rc1
+       // AspectJ1.6.1
+    public void testAroundAdviceOnFieldSet_pr229910() { runTest("around advice on field set"); }
     public void testPipelineCompilationGenericReturnType_pr226567() { runTest("pipeline compilation and generic return type"); }
 
     public static Test suite() {
index 77b0b60af52934530e20f3f598a3f50f48fbdcf0..210df6462dd0c41d9ee6675748b1ef0e9be2834d 100644 (file)
@@ -3,9 +3,15 @@
 <!-- AspectJ v1.6.1 Tests -->
 <suite>
 
+    <ajc-test dir="bugs161/pr229910" title="around advice on field set">
+        <compile files="Test.java" options="-1.5"/>
+        <run class="Test"/>
+    </ajc-test>
+    
     <ajc-test dir="bugs161/pr226567" title="pipeline compilation and generic return type">
         <compile files="BarAspect.aj Foo.java Bar.java" options="-1.5"/>
         <compile files="BarAspect.aj Bar.java Foo.java" options="-1.5"/>
     </ajc-test>
+    
 
 </suite>
\ No newline at end of file