]> source.dussan.org Git - aspectj.git/commitdiff
195090: ajc$ local vars that aren't used getting reported when using -warn:+unusedArg...
authoraclement <aclement>
Sat, 31 Jan 2009 22:06:22 +0000 (22:06 +0000)
committeraclement <aclement>
Sat, 31 Jan 2009 22:06:22 +0000 (22:06 +0000)
tests/bugs164/pr195090.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc164/Ajc164Tests.java
tests/src/org/aspectj/systemtest/ajc164/ajc164.xml

diff --git a/tests/bugs164/pr195090.java b/tests/bugs164/pr195090.java
new file mode 100644 (file)
index 0000000..515a135
--- /dev/null
@@ -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;
+        }
+}
index 0752ebeaae0f3f9e568465ce8a1baab3f581bc2f..124a005b0eb2aec5ae9f6e8f1f9f5d4f6c886498 100644 (file)
@@ -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");
index 1ddce0bb4229e6bac65a30100bd833b80d798a8e..2519577d4510a700fd828a2efc60464c40e34782 100644 (file)
@@ -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"/>