Multi-catch support: resolve to fields

This commit is contained in:
Roman Shevchenko
2011-02-15 21:11:44 +01:00
parent daaa7239d5
commit 924c40f58d
2 changed files with 14 additions and 2 deletions
@@ -1,6 +1,6 @@
abstract class C {
private static class NE { }
private static class E extends Exception { }
private static class E extends Exception { public String s; }
private static class E1 extends E { }
private static class E2 extends E { }
private static class E3 extends E { }
@@ -14,7 +14,7 @@ abstract class C {
void m() {
try { f(); } catch (E1 | E2 e) { }
try { f(); } catch (E2 | E e) { e.printStackTrace(); }
try { f(); } catch (E2 | E e) { e.printStackTrace(); System.out.println(e.s); }
try { f(); } catch (E2 | E1 e) { } catch (E e) { } catch (RE e) { }
try { f(); } catch (E1 | E e) { E ee = e; }
try { g(); } catch (IE1 | IE2 e) { E ee = e; I ii = e; }