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.

ParameterizedDP.java 780B

123456789101112131415161718192021222324252627
  1. package bugs;
  2. import bugsOtherPackage.INode;
  3. import bugsOtherPackage.NodeImpl;
  4. public class ParameterizedDP {
  5. public static void main(String[] args) {
  6. // 1) compile-time error here without
  7. // {unneeded} subaspect declare-parent
  8. // Tag as INode<Tag, Tag> from PC extends NodeImpl<Tag, Tag>
  9. ((TaggedTexts.Tag) null).getParent();
  10. }
  11. }
  12. class TaggedTexts {
  13. public static class Text { }
  14. public static class Tag { }
  15. static aspect PC extends NodeImpl<Tag, Tag> {
  16. // unneeded declare-parents duplicates one in NodeImpl
  17. // when here, get spurious error message
  18. // when commented out, d-p fails and get compiler error at 1) above
  19. // declare parents : Tag implements INode<Tag,Tag>;
  20. }
  21. }