framework/tests/all-systems/Issue1506.java
raw| 1 | // Test case for Issue 1506 |
| 2 | // https://github.com/typetools/checker-framework/issues/1506 |
| 3 | |
| 4 | import java.io.IOException; |
| 5 | import java.util.ArrayList; |
| 6 | |
| 7 | @SuppressWarnings("") // just check for crashes. |
| 8 | public class Issue1506 { |
| 9 | static void m() { |
| 10 | ArrayList<? super Exception> l = new ArrayList<>(); |
| 11 | try { |
| 12 | throw new IOException(); |
| 13 | } catch (RuntimeException | IOException e) { |
| 14 | l.add(e); |
| 15 | } |
| 16 | } |
| 17 | } |