aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs/InterfaceConstructor.java
blob: 9d10b2a6d1a62e149f5c882ca83db0424cc1525a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
interface I { }

public class InterfaceConstructor implements I {
	public static void main(String[] args) {
		new InterfaceConstructor();
	}
}

aspect NoSuchJP {
	before(): execution(I.new(..)) { // error expected
		// No constructor-execution on interface type
	}
	
	before(): execution(I+.new(..)) { // no error
		// This is OK, as there is a +
	}
	
}