| 1 |
// Test case for Issue 1377. |
| 2 |
// https://github.com/typetools/checker-framework/issues/1377 |
| 3 |
|
| 4 |
interface Func1377<P, R> { |
| 5 |
R apply(P p); |
| 6 |
} |
| 7 |
|
| 8 |
@SuppressWarnings("") // just check for crashes |
| 9 |
interface Issue1377<V> { |
| 10 |
static <U> Issue1377<U> of(Issue1377<U> in) { |
| 11 |
return in; |
| 12 |
} |
| 13 |
|
| 14 |
<S> Issue1377<S> m1(Func1377<? super V, S> f); |
| 15 |
|
| 16 |
<T> Issue1377<T> m2(Func1377<V, T> f); |
| 17 |
} |
| 18 |
|
| 19 |
@SuppressWarnings("") // just check for crashes |
| 20 |
class Crash1377 { |
| 21 |
void foo(Issue1377<Void> p) { |
| 22 |
Issue1377.of(p.m1(in -> p)).m2(empty -> 5); |
| 23 |
} |
| 24 |
} |