blob: 28faf00eb96dcb8873e917c2f3de9e5d7241d2b9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
public aspect GenericSignatureMatching {
// tests that references to a generic or parameterized type are
// always matched by a type pattern refering to the raw type form
void someCode() {
ConcreteImplementingClass cic = new ConcreteImplementingClass();
cic.asInt(5.0d);
GenericImplementingClass<Long> gic = new GenericImplementingClass<Long>();
gic.asInt(55L);
}
declare warning :
execution<T>(* GenericInterface<T extends Number>.asInt(T)) :
"execution<T>(* GenericInterface<T extends Number>.asInt(T))";
}
|