98 lines
4.3 KiB
Text
98 lines
4.3 KiB
Text
=== tests/cases/compiler/typeArgInference.ts ===
|
|
interface I {
|
|
>I : Symbol(I, Decl(typeArgInference.ts, 0, 0))
|
|
|
|
f<T, U>(a1: { a: T; b: U }[], a2: { a: T; b: U }[]): { c: T; d: U };
|
|
>f : Symbol(f, Decl(typeArgInference.ts, 0, 13))
|
|
>T : Symbol(T, Decl(typeArgInference.ts, 1, 6))
|
|
>U : Symbol(U, Decl(typeArgInference.ts, 1, 8))
|
|
>a1 : Symbol(a1, Decl(typeArgInference.ts, 1, 12))
|
|
>a : Symbol(a, Decl(typeArgInference.ts, 1, 17))
|
|
>T : Symbol(T, Decl(typeArgInference.ts, 1, 6))
|
|
>b : Symbol(b, Decl(typeArgInference.ts, 1, 23))
|
|
>U : Symbol(U, Decl(typeArgInference.ts, 1, 8))
|
|
>a2 : Symbol(a2, Decl(typeArgInference.ts, 1, 33))
|
|
>a : Symbol(a, Decl(typeArgInference.ts, 1, 39))
|
|
>T : Symbol(T, Decl(typeArgInference.ts, 1, 6))
|
|
>b : Symbol(b, Decl(typeArgInference.ts, 1, 45))
|
|
>U : Symbol(U, Decl(typeArgInference.ts, 1, 8))
|
|
>c : Symbol(c, Decl(typeArgInference.ts, 1, 58))
|
|
>T : Symbol(T, Decl(typeArgInference.ts, 1, 6))
|
|
>d : Symbol(d, Decl(typeArgInference.ts, 1, 64))
|
|
>U : Symbol(U, Decl(typeArgInference.ts, 1, 8))
|
|
|
|
g<T, U>(...arg: { a: T; b: U }[][]): { c: T; d: U };
|
|
>g : Symbol(g, Decl(typeArgInference.ts, 1, 72))
|
|
>T : Symbol(T, Decl(typeArgInference.ts, 2, 6))
|
|
>U : Symbol(U, Decl(typeArgInference.ts, 2, 8))
|
|
>arg : Symbol(arg, Decl(typeArgInference.ts, 2, 12))
|
|
>a : Symbol(a, Decl(typeArgInference.ts, 2, 21))
|
|
>T : Symbol(T, Decl(typeArgInference.ts, 2, 6))
|
|
>b : Symbol(b, Decl(typeArgInference.ts, 2, 27))
|
|
>U : Symbol(U, Decl(typeArgInference.ts, 2, 8))
|
|
>c : Symbol(c, Decl(typeArgInference.ts, 2, 42))
|
|
>T : Symbol(T, Decl(typeArgInference.ts, 2, 6))
|
|
>d : Symbol(d, Decl(typeArgInference.ts, 2, 48))
|
|
>U : Symbol(U, Decl(typeArgInference.ts, 2, 8))
|
|
}
|
|
var o = { a: 3, b: "test" };
|
|
>o : Symbol(o, Decl(typeArgInference.ts, 4, 3))
|
|
>a : Symbol(a, Decl(typeArgInference.ts, 4, 9))
|
|
>b : Symbol(b, Decl(typeArgInference.ts, 4, 15))
|
|
|
|
var x: I;
|
|
>x : Symbol(x, Decl(typeArgInference.ts, 5, 3))
|
|
>I : Symbol(I, Decl(typeArgInference.ts, 0, 0))
|
|
|
|
var t1 = x.f([o], [o]);
|
|
>t1 : Symbol(t1, Decl(typeArgInference.ts, 6, 3), Decl(typeArgInference.ts, 7, 3))
|
|
>x.f : Symbol(I.f, Decl(typeArgInference.ts, 0, 13))
|
|
>x : Symbol(x, Decl(typeArgInference.ts, 5, 3))
|
|
>f : Symbol(I.f, Decl(typeArgInference.ts, 0, 13))
|
|
>o : Symbol(o, Decl(typeArgInference.ts, 4, 3))
|
|
>o : Symbol(o, Decl(typeArgInference.ts, 4, 3))
|
|
|
|
var t1: { c: number; d: string };
|
|
>t1 : Symbol(t1, Decl(typeArgInference.ts, 6, 3), Decl(typeArgInference.ts, 7, 3))
|
|
>c : Symbol(c, Decl(typeArgInference.ts, 7, 9))
|
|
>d : Symbol(d, Decl(typeArgInference.ts, 7, 20))
|
|
|
|
var t2 = x.f<number, string>([o], [o]);
|
|
>t2 : Symbol(t2, Decl(typeArgInference.ts, 8, 3), Decl(typeArgInference.ts, 9, 3))
|
|
>x.f : Symbol(I.f, Decl(typeArgInference.ts, 0, 13))
|
|
>x : Symbol(x, Decl(typeArgInference.ts, 5, 3))
|
|
>f : Symbol(I.f, Decl(typeArgInference.ts, 0, 13))
|
|
>o : Symbol(o, Decl(typeArgInference.ts, 4, 3))
|
|
>o : Symbol(o, Decl(typeArgInference.ts, 4, 3))
|
|
|
|
var t2: { c: number; d: string };
|
|
>t2 : Symbol(t2, Decl(typeArgInference.ts, 8, 3), Decl(typeArgInference.ts, 9, 3))
|
|
>c : Symbol(c, Decl(typeArgInference.ts, 9, 9))
|
|
>d : Symbol(d, Decl(typeArgInference.ts, 9, 20))
|
|
|
|
var t3 = x.g([o], [o]);
|
|
>t3 : Symbol(t3, Decl(typeArgInference.ts, 10, 3), Decl(typeArgInference.ts, 11, 3))
|
|
>x.g : Symbol(I.g, Decl(typeArgInference.ts, 1, 72))
|
|
>x : Symbol(x, Decl(typeArgInference.ts, 5, 3))
|
|
>g : Symbol(I.g, Decl(typeArgInference.ts, 1, 72))
|
|
>o : Symbol(o, Decl(typeArgInference.ts, 4, 3))
|
|
>o : Symbol(o, Decl(typeArgInference.ts, 4, 3))
|
|
|
|
var t3: { c: number; d: string };
|
|
>t3 : Symbol(t3, Decl(typeArgInference.ts, 10, 3), Decl(typeArgInference.ts, 11, 3))
|
|
>c : Symbol(c, Decl(typeArgInference.ts, 11, 9))
|
|
>d : Symbol(d, Decl(typeArgInference.ts, 11, 20))
|
|
|
|
var t4 = x.g<number, string>([o], [o]);
|
|
>t4 : Symbol(t4, Decl(typeArgInference.ts, 12, 3), Decl(typeArgInference.ts, 13, 3))
|
|
>x.g : Symbol(I.g, Decl(typeArgInference.ts, 1, 72))
|
|
>x : Symbol(x, Decl(typeArgInference.ts, 5, 3))
|
|
>g : Symbol(I.g, Decl(typeArgInference.ts, 1, 72))
|
|
>o : Symbol(o, Decl(typeArgInference.ts, 4, 3))
|
|
>o : Symbol(o, Decl(typeArgInference.ts, 4, 3))
|
|
|
|
var t4: { c: number; d: string };
|
|
>t4 : Symbol(t4, Decl(typeArgInference.ts, 12, 3), Decl(typeArgInference.ts, 13, 3))
|
|
>c : Symbol(c, Decl(typeArgInference.ts, 13, 9))
|
|
>d : Symbol(d, Decl(typeArgInference.ts, 13, 20))
|
|
|