summaryrefslogtreecommitdiffstats
path: root/tests/bugs150/Pr114054.aj
blob: 3f776df433eb30a966631bd367a5c737251c3859 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
public class Pr114054 {
	public static boolean passed;
	public static void main(String[] args) {
		SampleSeries me = new SampleSeries();
		me.okSeries();
		me.open();
		me.close();
		if (!passed) {
			throw new Error("failed to advise...");
		}
	}
	static class SampleSeries {
		void open() {}
		void close() {}
		void okSeries() {open(); close();}
	}
	static aspect AAAA 
	// comment this out, and !call(...) works
	pertarget(tracked())
	{
	    protected final pointcut tracked() : 
			call(void SampleSeries.*()) 
			// comment this out, and pertarget works...
			&& !call(void SampleSeries.*Series())
			;
		before() : tracked() {
			Pr114054.passed = true;
		}		
	}
}