summaryrefslogtreecommitdiffstats
path: root/tests/hasmember/HasField.aj
blob: d8b4ef522d59d7affe5f1afa7b5dce290def07b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
public aspect HasField {
	
	declare parents : hasfield(* printer) implements Printable; 

	public static void main(String[] args) {
		C c = new C();
		if (! (c instanceof Printable)) {
			throw new RuntimeException("declare parents : hasfield failed");
		}
	}
}

class C {
	
	int printer;
	
}

interface Printable {};