diff options
author | acolyer <acolyer> | 2004-12-15 20:51:01 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2004-12-15 20:51:01 +0000 |
commit | 1b6e9edfacf5f3d2732d164b15bc26022835c6ac (patch) | |
tree | 120b839c6f1760e266f56acf6aea89723d7b1f07 /tests/src/org/aspectj/systemtest/ajc121 | |
parent | 1575a175b511eadbae03fc760b0cd20edde6ae4e (diff) | |
download | aspectj-1b6e9edfacf5f3d2732d164b15bc26022835c6ac.tar.gz aspectj-1b6e9edfacf5f3d2732d164b15bc26022835c6ac.zip |
partial fix for bug 61568.
These changes are both (a) a performance optimization, and (b) an
improvement on the binding across || rules that we implemented in
1.2.1.
Instead of saying the the first binding in a left-to-right traversal of the
pointcuts DNF is the one that you get (too much to ask users to do DNF
rewriting in their heads), this version implements the rule that every
|| branch in the DNF must bind all formals, and if two || branches can have
any join points in common (can match join points of the same kind), then
both must bind all formals identically.
So it allows things like execution(* *(..)) && args(x) || call(* *(..)) && this(x)
which previously we used to forbid.
But primarily it turned out to be a performance optimization.
Diffstat (limited to 'tests/src/org/aspectj/systemtest/ajc121')
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml b/tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml index 77d52f3dc..9089289e9 100644 --- a/tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml +++ b/tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml @@ -4,12 +4,10 @@ <ajc-test dir="bugs" pr="62073" title="false ambiguous binding error (introduced in 1.2rc2)"> <compile files="DisjunctVarBinding_2.java,DisjunctVarBinding_3.java"> - <message kind="error" line="25" file="DisjunctVarBinding_2.java" text="Ambiguous binding of type B"/> - <message kind="error" line="25" file="DisjunctVarBinding_2.java" text="Ambiguous binding of type A"/> + <message kind="error" line="4" file="DisjunctVarBinding_3.java" text="ambiguous binding of parameter(s) a, b across '||' in pointcut"/> </compile> <compile files="DisjunctVarBinding_3.java,DisjunctVarBinding_2.java"> - <message kind="error" line="25" file="DisjunctVarBinding_2.java" text="Ambiguous binding of type B"/> - <message kind="error" line="25" file="DisjunctVarBinding_2.java" text="Ambiguous binding of type A"/> + <message kind="error" line="4" file="DisjunctVarBinding_3.java" text="ambiguous binding of parameter(s) a, b across '||' in pointcut"/> </compile> </ajc-test> @@ -213,14 +211,11 @@ <ajc-test dir="bugs/oxford" pr="65319" title="ajc crashes when compiling the following program (binding this() and target())"> <compile files="PR65319.java"> - <message kind="error" line="7" text="Cannot use target() to match at this"/> - <message kind="error" line="7" text="Cannot use this() to match at this"/> - <message kind="error" line="11" text="Cannot use target() to match at this"/> - <message kind="error" line="11" text="Cannot use this() to match at this"/> - <message kind="error" line="11" text="Ambiguous binding of type Test"/> - <message kind="error" line="15" text="Cannot use target() to match at this"/> - <message kind="error" line="15" text="Cannot use this() to match at this"/> - <message kind="error" line="15" text="Ambiguous binding of type Test"/> + <!-- target comes before this comes before args, and we only report one error --> + <message kind="error" line="23" text="ambiguous binding of parameter(s) x across '||' in pointcut"/> + <message kind="error" line="25" text="ambiguous binding of parameter(s) x across '||' in pointcut"/> + <message kind="error" line="27" text="ambiguous binding of parameter(s) x across '||' in pointcut"/> + <message kind="error" line="29" text="ambiguous binding of parameter(s) x across '||' in pointcut"/> </compile> </ajc-test> |