Project: AspectJ
Bug 112027 unexpected error unboundFormalInPC
Reported: 2005-10-08 02:49:49 | Status: resolved fixed

In 1.5.0M4, I get error "the parameter tis is not bound in [all branches of] pointcut". Not true of 1.2.1. Untested in other development versions of 1.5.0. No branches (all &&) but duplicate specification of this(..). ------------------------------------------ package demo; /** * PerThis */ public class PerThis { public static void main(String[] args) { new This().test(); } } aspect PerThisTest perthis(pc()) { // TutIndex example-basic-perthis pointcut pc() : this(This) && !within(PerThisTest) && call(void run()); before(This tis) : pc() && this(tis){ System.out.println("bef " + this + " <-- " + tis); } } class This { int i; void test() { run(); } void run() { System.out.println("run " + this); } }

Files changed in fix:
tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java weaver/src/org/aspectj/weaver/patterns/BindingTypePattern.java weaver/src/org/aspectj/weaver/patterns/ExactTypePattern.java