| 1 |
import org.checkerframework.checker.nullness.qual.*; |
| 2 |
|
| 3 |
public class GenericsBounds3 { |
| 4 |
class Sup<X extends @NonNull Object> {} |
| 5 |
|
| 6 |
// :: error: (type.argument.type.incompatible) |
| 7 |
class Sub extends Sup<@Nullable Object> {} |
| 8 |
|
| 9 |
class SubGood extends Sup<@NonNull Object> {} |
| 10 |
|
| 11 |
interface ISup<X extends @NonNull Object> {} |
| 12 |
|
| 13 |
// :: error: (type.argument.type.incompatible) |
| 14 |
class ISub implements ISup<@Nullable Object> {} |
| 15 |
|
| 16 |
class ISubGood implements ISup<@NonNull Object> {} |
| 17 |
|
| 18 |
// :: error: (type.argument.type.incompatible) |
| 19 |
class ISub2 extends Sup<Object> implements java.io.Serializable, ISup<@Nullable Object> {} |
| 20 |
} |