Skip to content

Commit

Permalink
test add
Browse files Browse the repository at this point in the history
  • Loading branch information
Tahiatul Islam committed Apr 12, 2024
1 parent f1da5ac commit 8ccc876
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions specimin/test/Issue3850.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import org.checkerframework.checker.nullness.qual.PolyNull;

class Issue3850 {

private static Iterable<@PolyNull String> toPos(Iterable<? extends @PolyNull Object> nodes) {
// :: error: (return.type.incompatible)
return transform(nodes, node -> node == null ? null : node.toString());
}

public static <F, T> Iterable<T> transform(
Iterable<? extends F> iterable,
java.util.function.Function<? super F, ? extends T> function) {
throw new Error("implementation is irrelevant");
}
}

0 comments on commit 8ccc876

Please sign in to comment.