TypeScript/tests/cases/compiler/reverseInferenceInContextualInstantiation.ts
2014-07-12 17:30:19 -07:00

4 lines
118 B
TypeScript

function compare<T>(a: T, b: T): number { return 0; }
var x: number[];
x.sort(compare); // Error, but shouldn't be