Closed
Description
Found by playing around with @mattmccutchen's example at #26013 (comment):
interface CoolArray<E> extends Array<E> {
hello: number;
}
declare function foo<T extends any[]>(cb: (...args: T) => void): void;
foo<CoolArray<any>>(); // error
foo<CoolArray<any>>(100); // error
foo<CoolArray<any>>(foo); // no error!!
Expected: All of these calls produce an error and have a good error message.
Actual: The first two have bad errors, the last one is considered okay.