framework/tests/all-systems/java8inference/Issue1775.java
raw| 1 | // Test case for issue 1775 |
| 2 | // https://github.com/typetools/checker-framework/issues/1775 |
| 3 | |
| 4 | @SuppressWarnings("") // just check for crashes |
| 5 | class Issue1775 { |
| 6 | interface Box<A> { |
| 7 | <B extends A> B get(); |
| 8 | } |
| 9 | |
| 10 | <S extends String> Box<S[]> getBox() { |
| 11 | return null; |
| 12 | } |
| 13 | |
| 14 | void m() { |
| 15 | for (String s : getBox().get()) {} |
| 16 | } |
| 17 | } |