You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

GenericSignatureMatching.aj 539B

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