| 1 |
// A test case that should not longer crash once issue #717 is fixed |
| 2 |
// https://github.com/typetools/checker-framework/issues/717 |
| 3 |
public class Issue717 { |
| 4 |
|
| 5 |
public static <T extends Interface<? super T>> void foo2(T a, T b) { |
| 6 |
a.compareTo(b); |
| 7 |
} |
| 8 |
|
| 9 |
public static <T extends Object & Interface<? super T>> void foo(T a, T b) { |
| 10 |
// asSuper doesn't find Interface, so the type variable F is not substituted |
| 11 |
// causing isSuptype to be called between Object & Interface and F. |
| 12 |
a.compareTo(b); |
| 13 |
} |
| 14 |
|
| 15 |
interface Interface<F> { |
| 16 |
void compareTo(F t); |
| 17 |
} |
| 18 |
} |