diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs153/pr155763/Test.java | 31 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java | 4 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc153/ajc153.xml | 6 |
3 files changed, 41 insertions, 0 deletions
diff --git a/tests/bugs153/pr155763/Test.java b/tests/bugs153/pr155763/Test.java new file mode 100644 index 000000000..2cc42f0cc --- /dev/null +++ b/tests/bugs153/pr155763/Test.java @@ -0,0 +1,31 @@ +import java.util.List; + +public class Test { + + public boolean method(final MyInterface iface) { + for(final String s:iface.listFile()) if(s.equals("blah")) { + System.out.println("Test.method()"); + continue; + } + return false; + } + + public void notCalledMethod() { + } + +} + +interface MyInterface { + + public abstract List<String> listFile(); +} + +aspect MyAspect { + + pointcut p() : call(public * Test.notCalledMethod()); + + before() : p() { + System.out.println("calling method"); + } + +} diff --git a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java index 8f53af8fc..c5181da45 100644 --- a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java @@ -83,6 +83,10 @@ public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase { runTest("NPE in InitializerSignatureImpl"); } + public void testLineNumberTableCorrectWithGenericsForEachAndContinue_pr155763() { + runTest("ensure LineNumberTable correct with generics, for each and continue"); + } + ///////////////////////////////////////// public static Test suite() { return XMLBasedAjcTestCase.loadSuite(Ajc153Tests.class); diff --git a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml index 2dc4ec7e7..3df82bc33 100644 --- a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml +++ b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml @@ -383,4 +383,10 @@ </run> </ajc-test> + <ajc-test dir="bugs153/pr155763" title="ensure LineNumberTable correct with generics, for each and continue"> + <compile files="Test.java" options="-1.5"> + <message kind="warning" line="27" text="adviceDidNotMatch"/> + </compile> + </ajc-test> + </suite>
\ No newline at end of file |