Преглед изворни кода

119749 test program.

tags/V1_5_0RC1
aclement пре 18 година
родитељ
комит
107bdfa4da
1 измењених фајлова са 33 додато и 0 уклоњено
  1. 33
    0
      tests/bugs150/pr119749/InheritedThrows.java

+ 33
- 0
tests/bugs150/pr119749/InheritedThrows.java Прегледај датотеку

@@ -0,0 +1,33 @@
public class InheritedThrows {

static aspect A {
declare warning : execution (* *.*(..) throws Ex1) : "one";
// declare warning : execution (* *.*(..) throws Ex2) : "two";
// declare warning : execution (* *.*(..) throws !(Ex1||Ex2)) : "neither";
// declare warning : execution (* *.*(..) throws Ex1, Ex2) : "both";
}

public static class Ex1 extends Exception {}

public static class Ex2 extends Exception {}

public interface MyInterface {
public void m() throws Ex1, Ex2;
}

private static class NestedClass1 implements MyInterface {
public void m() throws Ex1 {}
}

private static class NestedClass2 implements MyInterface {
public void m() throws Ex2 {}
}

private static class NestedClassBoth implements MyInterface {
public void m() throws Ex1, Ex2 {}
}

private static class NestedClassNeither implements MyInterface {
public void m() {}
}
}

Loading…
Откажи
Сачувај