| 1 |
// Test case for Issue #803 |
| 2 |
// https://github.com/typetools/checker-framework/issues/803 |
| 3 |
// @skip-test |
| 4 |
|
| 5 |
import org.checkerframework.checker.nullness.qual.*; |
| 6 |
|
| 7 |
interface GenFunc { |
| 8 |
<T extends @Nullable Number, U extends @Nullable Number> T apply(U u); |
| 9 |
} |
| 10 |
|
| 11 |
interface GenFunc2 { |
| 12 |
<T extends @Nullable Number, U extends @NonNull Number> T apply(U u); |
| 13 |
} |
| 14 |
|
| 15 |
class TestGenFunc { |
| 16 |
static <V extends @NonNull Number, P extends @Nullable Number> V apply(P u) { |
| 17 |
throw new RuntimeException(""); |
| 18 |
} |
| 19 |
|
| 20 |
void context() { |
| 21 |
GenFunc f = TestGenFunc::apply; |
| 22 |
// :: error: (methodref.param.invalid) |
| 23 |
GenFunc2 f2 = TestGenFunc::apply; |
| 24 |
} |
| 25 |
} |