framework/tests/all-systems/GenericTest13.java
raw| 1 | // Test case for Issue 142 |
| 2 | // https://github.com/typetools/checker-framework/issues/142 |
| 3 | |
| 4 | class GenericTest13 { |
| 5 | interface Entry<K extends Object, V extends Object> { |
| 6 | V getValue(); |
| 7 | } |
| 8 | |
| 9 | interface Iterator<E extends Object> { |
| 10 | E next(); |
| 11 | } |
| 12 | |
| 13 | <S extends Object> S call(Iterator<? extends Entry<?, S>> entryIterator) { |
| 14 | return entryIterator.next().getValue(); |
| 15 | } |
| 16 | } |