void () { doTest(""" import java.util.*; class Test { static <A extends CharSequence> A[] toArray2(List<CharSequence> cs) { //noinspection unchecked return (A[]) cs.toArray(new CharSequence[0]); } }"""); }