| 1 |
// Test case for Issue 1992: |
| 2 |
// https://github.com/typetools/checker-framework/issues/1992 |
| 3 |
|
| 4 |
import java.util.List; |
| 5 |
import java.util.function.Function; |
| 6 |
|
| 7 |
@SuppressWarnings("") // Check for crashes only |
| 8 |
class Issue1992 { |
| 9 |
|
| 10 |
interface A {} |
| 11 |
|
| 12 |
static class B<T extends A> { |
| 13 |
C a; |
| 14 |
T b; |
| 15 |
} |
| 16 |
|
| 17 |
static class C { |
| 18 |
Function<? super A, E> c; |
| 19 |
|
| 20 |
enum E { |
| 21 |
NONE |
| 22 |
} |
| 23 |
} |
| 24 |
|
| 25 |
boolean f(List<B<?>> x) { |
| 26 |
B<?> d = x.get(x.size() - 1); |
| 27 |
return d.a.c.apply(d.b) != C.E.NONE; |
| 28 |
} |
| 29 |
} |