aboutsummaryrefslogtreecommitdiffstats
path: root/tests/java5/generics/pointcuts/GenericDeclaringTypeWithParameterErasure.aj
blob: 8a77e95a0e7832c8ad73a1f7cf70e49df2fad645 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
public aspect GenericDeclaringTypeWithParameterErasure {
	
	// tests that the erasure of parameter types does NOT match a member when
	// the declaring type pattern is generic (must use the type variable instead in
	// the non-raw [cooked?] world).
	
	void someCode() {
		ConcreteImplementingClass cic = new ConcreteImplementingClass();
		cic.asInt(5.0d);  
		GenericImplementingClass<Long> gic = new GenericImplementingClass<Long>();
		gic.asInt(55L);   
	}
	
	declare warning : 
		execution<N>(* GenericInterface<N extends Number>.asInt(Number)) :
		"execution<N>(* GenericInterface<N>.asInt(Number))";
	
}