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.

Y.java 553B

1234567891011121314151617181920
  1. public class Y {
  2. public static void main(String[]argv) {
  3. TestClass t = new TestClass();
  4. if (!(t instanceof Interface1)) throw new RuntimeException("t not instanceof Interface1");
  5. if (!(t instanceof Interface1TestClass)) throw new RuntimeException("t not instanceof Interface1TestClass");
  6. }
  7. }
  8. interface Interface1 {}
  9. interface Interface1TestClass {}
  10. aspect TestAspect {
  11. declare parents: TestClass implements Interface1;
  12. declare parents: TestClass && Interface1+ implements Interface1TestClass;
  13. }
  14. class TestClass {}