| 1 |
// Test case for Issue 1379. |
| 2 |
// https://github.com/typetools/checker-framework/issues/1379 |
| 3 |
|
| 4 |
interface Box1379<V> {} |
| 5 |
|
| 6 |
interface Trans1379<I, O> { |
| 7 |
Box1379<O> apply(I in); |
| 8 |
} |
| 9 |
|
| 10 |
@SuppressWarnings("") // just check for crashes |
| 11 |
abstract class Issue1379 { |
| 12 |
abstract <I, O> Box1379<O> app(Box1379<I> in, Trans1379<? super I, ? extends O> t); |
| 13 |
|
| 14 |
abstract <I, O> Trans1379<I, O> pass(Trans1379<I, O> t); |
| 15 |
|
| 16 |
abstract Box1379<Number> box(Number p); |
| 17 |
|
| 18 |
void foo(Box1379<Number> p) { |
| 19 |
app(p, pass(this::box)); |
| 20 |
} |
| 21 |
} |