public class CrashRepro {
interface Builder<K, V> {
Builder<K, V> putAll(K key, V... values);
}
interface BiAccumulator<A, K, V> {
void accept(A a, K k, V v);
}
interface BiStream<K, V> {
<A> A collect(A container, BiAccumulator<? super A, ? super K, ? super V> accumulator);
}
static <K, V> Builder<K, V> builder() {
throw new UnsupportedOperationException();
}
void test(BiStream<String, String> stream) {
stream.collect(builder(), Builder::putAll);
}
}
$ ~/checker-framework-4.0.0/checker/bin/javac -processor nullness CrashRepro.java
CrashRepro.java:19: error: [type.argument.inference.crashed] Type argument inference crashed for Builder.putAll
stream.collect(builder(), Builder::putAll);
^
error: An exception occurred: Index 3 out of bounds for length 3
CrashRepro.java:19: error: [type.argument.inference.crashed] Type argument inference crashed for Builder.putAll
stream.collect(builder(), Builder::putAll);
^
error: An exception occurred: Index 3 out of bounds for length 3
Note: CrashRepro.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors