aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs150/Pr109283.aj
blob: 62d378e05c693b444e9c1ac6843c4654e34bba7d (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
import java.util.*;

public class Pr109283 {
	
	enum Foo { Wibble, Wobble, Woo }
	
	public static void main(String[] args) throws Exception {
		EnumSet<Foo> set = EnumSet.noneOf(Foo.class);
		C c2 = Recipient.instanceOf(C.class);
	}
	
	
}

class C {}

class Recipient {}

aspect Donor {
	
	static <E> E Recipient.first(List<E> elements) { return elements.get(0); }
	
	public static <T> T Recipient.instanceOf(Class<T> aT) throws Exception { 
		return aT.newInstance(); 
	}
	
}