Skip to content

Commit

Permalink
Test case for issue #4924
Browse files Browse the repository at this point in the history
  • Loading branch information
mernst committed Oct 13, 2021
1 parent 218a743 commit 2e9b361
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
27 changes: 27 additions & 0 deletions checker/tests/nullness/Issue4924.java
@@ -0,0 +1,27 @@
// Test case for issue #4924: https://tinyurl.com/cfissue/4924

// @skip-test until the issue is fixed

class Issue4924 {}

interface Callback4924<T> {}

class Template4924<T> {
interface Putter4924<T> {
void put(T result);
}

class Adapter4924 implements Callback4924<T> {
Adapter4924(Putter4924<T> putter) {}
}
}

class Super4924<T> extends Template4924<T> {}

class Issue extends Super4924<String> {
void go(Callback4924<String> callback) {}

void foo() {
go(new Adapter4924(result -> {}));
}
}
6 changes: 3 additions & 3 deletions checker/tests/nullness/OverrideGenerics.java
@@ -1,13 +1,13 @@
import org.checkerframework.checker.nullness.qual.*;

class Super<S extends @Nullable Object> {
class OGSuper<S extends @Nullable Object> {
public void m(S p) {}
}

class Impl1<T extends @NonNull Object> extends Super<T> {
class OGImpl1<T extends @NonNull Object> extends OGSuper<T> {
public void m(T p) {}
}

class Impl2<T> extends Super<T> {
class OGImpl2<T> extends OGSuper<T> {
public void m(T p) {}
}

0 comments on commit 2e9b361

Please sign in to comment.