| 1 |
import org.checkerframework.checker.nullness.qual.*; |
| 2 |
|
| 3 |
public class Issue459 { |
| 4 |
public class Generic<K, V> {} |
| 5 |
|
| 6 |
interface Iface<K, V> { |
| 7 |
public <K1 extends K, V1 extends V> Generic<K, V> foo(Generic<? super K1, ? super V1> arg); |
| 8 |
|
| 9 |
public <K2 extends K, V2 extends V> Generic<K, V> foo2( |
| 10 |
Generic<? super K2, ? super V2> arg, K2 strArg); |
| 11 |
} |
| 12 |
|
| 13 |
void f(Iface<Object, Object> arg, @NonNull String nnString) { |
| 14 |
final Generic<String, Integer> obj = new Generic<>(); |
| 15 |
arg.foo(obj); |
| 16 |
|
| 17 |
final Generic<@Nullable String, Integer> obj2 = new Generic<>(); |
| 18 |
arg.foo2(obj2, nnString); |
| 19 |
} |
| 20 |
} |