]> source.dussan.org Git - aspectj.git/commitdiff
194429: test and fix: include context in error
authoraclement <aclement>
Thu, 21 Aug 2008 18:13:04 +0000 (18:13 +0000)
committeraclement <aclement>
Thu, 21 Aug 2008 18:13:04 +0000 (18:13 +0000)
tests/bugs162/pr194429/A.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java
tests/src/org/aspectj/systemtest/ajc162/ajc162.xml

diff --git a/tests/bugs162/pr194429/A.java b/tests/bugs162/pr194429/A.java
new file mode 100644 (file)
index 0000000..c6a0841
--- /dev/null
@@ -0,0 +1,18 @@
+import java.util.*;
+
+public class A {
+  public void foo(Set s) {
+  }
+  public void goo(Map s) {
+  }
+}
+
+aspect X {
+
+  pointcut p(Set s): execution(* *(..)) && args(s);
+
+  before(Map m): p(m) {
+  }
+
+}
+
index 08dba1573b8531dce1f79242984db295ceba16bf..7b06234bc423bc3f021864aae2fe0a91dc267ce4 100644 (file)
@@ -19,6 +19,7 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
 public class Ajc162Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
        
        // AspectJ1.6.2 
+       public void testMissingContext_pr194429() { runTest("missing context"); }
        public void testWarningsForLimitations_pr210114() { runTest("warnings for limitations"); }
        public void testPTW_pr244830() { runTest("ptw initFailureCause"); }
        public void testGenericItdsOverrides_pr222648() { runTest("generic itds - overrides"); }
index ccbe977f087b02c4709fbab1d147608d2857651c..1b3cfed020a5ab5f8d315416ae69532ed5d5e300 100644 (file)
@@ -3,6 +3,12 @@
 <!-- AspectJ v1.6.2 Tests -->
 <suite>
 
+       <ajc-test dir="bugs162/pr194429" title="missing context">
+         <compile files="A.java" options="-1.5">
+           <message kind="error" line="14" text="incompatible type, expected java.util.Set found BindingTypePattern("/>
+         </compile>
+       </ajc-test>
+       
        <ajc-test dir="bugs162/pr210114" title="warnings for limitations">
          <compile files="TestAspect.java" options="-1.5">
                <message kind="warning" text="Only before advice is supported on handler join points (compiler limitation)"/>