framework/tests/all-systems/Issue1867.java
raw| 1 | // Test case for Issue 1867 |
| 2 | // https://github.com/typetools/checker-framework/issues/1867 |
| 3 | |
| 4 | import java.util.List; |
| 5 | |
| 6 | public abstract class Issue1867 { |
| 7 | interface AInterface {} |
| 8 | |
| 9 | interface BInterface<X extends AInterface> { |
| 10 | List<? extends X> g(); |
| 11 | } |
| 12 | |
| 13 | abstract List<? extends BInterface<? extends AInterface>> h(); |
| 14 | |
| 15 | void f() { |
| 16 | for (BInterface<? extends AInterface> x : h()) { |
| 17 | for (AInterface y : x.g()) {} |
| 18 | } |
| 19 | } |
| 20 | } |