diff options
author | aclement <aclement> | 2009-01-31 22:06:22 +0000 |
---|---|---|
committer | aclement <aclement> | 2009-01-31 22:06:22 +0000 |
commit | 3c4a44d338cd120716df6952a273f1f48eb5076c (patch) | |
tree | 273916e8ab30c560b54a72ffda9376a7549a7278 | |
parent | 1da1f7cdaca36e258045ef29660abaa13c84ebed (diff) | |
download | aspectj-3c4a44d338cd120716df6952a273f1f48eb5076c.tar.gz aspectj-3c4a44d338cd120716df6952a273f1f48eb5076c.zip |
195090: ajc$ local vars that aren't used getting reported when using -warn:+unusedArgument
-rw-r--r-- | tests/bugs164/pr195090.java | 19 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc164/Ajc164Tests.java | 10 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc164/ajc164.xml | 5 |
3 files changed, 31 insertions, 3 deletions
diff --git a/tests/bugs164/pr195090.java b/tests/bugs164/pr195090.java new file mode 100644 index 000000000..515a135be --- /dev/null +++ b/tests/bugs164/pr195090.java @@ -0,0 +1,19 @@ +/** + * Helper interface. + */ +interface Interface{ + boolean methodToBeImplemented(); +} + +/** + * Exposes the ajc$this_ is never read warning. + */ +public aspect pr195090 { + public boolean Interface.methodToBeImplemented() { + return returnTrue(); + } + + public static boolean returnTrue() { + return true; + } +} diff --git a/tests/src/org/aspectj/systemtest/ajc164/Ajc164Tests.java b/tests/src/org/aspectj/systemtest/ajc164/Ajc164Tests.java index 0752ebeaa..124a005b0 100644 --- a/tests/src/org/aspectj/systemtest/ajc164/Ajc164Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc164/Ajc164Tests.java @@ -24,13 +24,17 @@ import org.aspectj.testing.XMLBasedAjcTestCase; public class Ajc164Tests extends org.aspectj.testing.XMLBasedAjcTestCase { + public void testAjcThisNotRead() { + runTest("ajcthis not read"); + } + public void testRecursiveCflow() { runTest("recursive cflow"); } - //public void testAopConfig1() { - // runTest("aop config - 1"); - //} + // public void testAopConfig1() { + // runTest("aop config - 1"); + // } public void testAnnoDecprecedence_pr256779() { runTest("anno decprecedence"); diff --git a/tests/src/org/aspectj/systemtest/ajc164/ajc164.xml b/tests/src/org/aspectj/systemtest/ajc164/ajc164.xml index 1ddce0bb4..2519577d4 100644 --- a/tests/src/org/aspectj/systemtest/ajc164/ajc164.xml +++ b/tests/src/org/aspectj/systemtest/ajc164/ajc164.xml @@ -8,6 +8,11 @@ </compile> </ajc-test> + <ajc-test dir="bugs164" title="ajcthis not read"> + <compile files="pr195090.java" options="-1.5 -warn:+unusedArgument"> + </compile> + </ajc-test> + <ajc-test dir="bugs164/pr256779" title="anno decprecedence"> <compile files="ThisAspect.java OtherAspect.java" options="-1.5"/> <run class="com.ThisAspect" ltw="aop.xml"/> |