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.

pr100260.aj 754B

12345678910111213141516171819202122232425
  1. class Generic_Parent<T> {}
  2. class Child extends Generic_Parent<Integer> {}
  3. class Generic_Child<T> extends Generic_Parent<Integer> {}
  4. public aspect pr100260 {
  5. public void Generic_Parent.inherited_method() {}
  6. public int Generic_Parent.inherited_field;
  7. public static void test() {
  8. int inherited_field;
  9. inherited_field = new Generic_Child().inherited_field; // works
  10. inherited_field = new Generic_Child<Integer>().inherited_field; // works
  11. inherited_field = new Child().inherited_field; // works
  12. new Generic_Child().inherited_method(); // works
  13. new Generic_Child<Integer>().inherited_method(); // unresolved
  14. new Child().inherited_method(); // unresolved
  15. }
  16. public static void main(String []argv) {
  17. test();
  18. }
  19. }