void () { doTest(""" import java.util.stream.*; import java.util.function.*; abstract class AbstractStreamWrapper<T extends Cloneable> implements Stream<T> { private final Stream<T> delegate; AbstractStreamWrapper(Stream<T> delegate) { this.delegate = delegate; } @Override public <A> A[] toArray(IntFunction<A[]> generator) { return delegate.toArray(generator); } public <A extends CharSequence> A[] toArray2(IntFunction<A[]> generator) { return delegate.toArray(/*Array of type 'java.lang.Cloneable[]' expected, 'A[]' found*/generator/**/); } public <A extends Cloneable> A[] toArray3(IntFunction<A[]> generator) { return delegate.toArray(generator); } }"""); }