21 lines
1.2 KiB
Plaintext
21 lines
1.2 KiB
Plaintext
=== tests/cases/compiler/reverseInferenceInContextualInstantiation.ts ===
|
|
function compare<T>(a: T, b: T): number { return 0; }
|
|
>compare : <T>(a: T, b: T) => number, Symbol(compare, Decl(reverseInferenceInContextualInstantiation.ts, 0, 0))
|
|
>T : T, Symbol(T, Decl(reverseInferenceInContextualInstantiation.ts, 0, 17))
|
|
>a : T, Symbol(a, Decl(reverseInferenceInContextualInstantiation.ts, 0, 20))
|
|
>T : T, Symbol(T, Decl(reverseInferenceInContextualInstantiation.ts, 0, 17))
|
|
>b : T, Symbol(b, Decl(reverseInferenceInContextualInstantiation.ts, 0, 25))
|
|
>T : T, Symbol(T, Decl(reverseInferenceInContextualInstantiation.ts, 0, 17))
|
|
>0 : number
|
|
|
|
var x: number[];
|
|
>x : number[], Symbol(x, Decl(reverseInferenceInContextualInstantiation.ts, 1, 3))
|
|
|
|
x.sort(compare); // Error, but shouldn't be
|
|
>x.sort(compare) : number[]
|
|
>x.sort : (compareFn?: (a: number, b: number) => number) => number[], Symbol(Array.sort, Decl(lib.d.ts, 1054, 45))
|
|
>x : number[], Symbol(x, Decl(reverseInferenceInContextualInstantiation.ts, 1, 3))
|
|
>sort : (compareFn?: (a: number, b: number) => number) => number[], Symbol(Array.sort, Decl(lib.d.ts, 1054, 45))
|
|
>compare : <T>(a: T, b: T) => number, Symbol(compare, Decl(reverseInferenceInContextualInstantiation.ts, 0, 0))
|
|
|