aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs164/pr209051/Bug.java
blob: ac1bf7b8ec67670fa35fbab9f5e4904018595a03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import org.aspectj.lang.annotation.*;

public @Aspect class Bug {
	@Pointcut("args(i) && if() && within(Foo)")
	public static boolean pc(int i) {
		return i < 0;
	}
	
	@Before("pc(*)")
	public void advice() { System.out.println("advice running");}

  public static void main(String []argv) {
    new Foo().trigger(-1);
    new Foo().trigger(+1);
  }
}

class Foo {
  public void trigger(int i) {}
}