aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs150/Pr73050.aj
blob: ed0168c60da8df2fbebb31a5e20d5db524a28a56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
public aspect Pr73050 {
	
	pointcut anonymousTypeMatchedByNamePattern() :
		staticinitialization(Pr73050.*1*);
	
	pointcut anonymousTypeMatchedByWildCard() :
		staticinitialization(Pr73050.*);
	
	declare warning : anonymousTypeMatchedByNamePattern() : 
		"anonymous types shouldn't be matched by name patterns";
	
	declare warning : anonymousTypeMatchedByWildCard() :
		"anonymous types should be matched by a * wild card";
	
	public void foo() {
		(new Runnable() {
			public void run() {}
		}).run();
	}
}