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.

Covariance.java 231B

12345678910111213141516
  1. interface Result {}
  2. interface Factory {
  3. Result getInstance();
  4. }
  5. aspect A_forB {
  6. declare parents: B implements Result;
  7. public B D.getInstance() {
  8. return new B();
  9. }
  10. }
  11. class D implements Factory {}
  12. class B {}