39 lines
1.5 KiB
Text
39 lines
1.5 KiB
Text
=== tests/cases/compiler/typeArgumentInferenceOrdering.ts ===
|
|
function foo<T>(f: { y: T }): T { return null }
|
|
>foo : Symbol(foo, Decl(typeArgumentInferenceOrdering.ts, 0, 0))
|
|
>T : Symbol(T, Decl(typeArgumentInferenceOrdering.ts, 0, 13))
|
|
>f : Symbol(f, Decl(typeArgumentInferenceOrdering.ts, 0, 16))
|
|
>y : Symbol(y, Decl(typeArgumentInferenceOrdering.ts, 0, 20))
|
|
>T : Symbol(T, Decl(typeArgumentInferenceOrdering.ts, 0, 13))
|
|
>T : Symbol(T, Decl(typeArgumentInferenceOrdering.ts, 0, 13))
|
|
|
|
var x = foo(new C()).x; // was Error that property x does not exist on type {}
|
|
>x : Symbol(x, Decl(typeArgumentInferenceOrdering.ts, 1, 3))
|
|
>foo(new C()).x : Symbol(I.x, Decl(typeArgumentInferenceOrdering.ts, 7, 13))
|
|
>foo : Symbol(foo, Decl(typeArgumentInferenceOrdering.ts, 0, 0))
|
|
>C : Symbol(C, Decl(typeArgumentInferenceOrdering.ts, 1, 23))
|
|
>x : Symbol(I.x, Decl(typeArgumentInferenceOrdering.ts, 7, 13))
|
|
|
|
class C {
|
|
>C : Symbol(C, Decl(typeArgumentInferenceOrdering.ts, 1, 23))
|
|
|
|
y: I;
|
|
>y : Symbol(y, Decl(typeArgumentInferenceOrdering.ts, 3, 9))
|
|
>I : Symbol(I, Decl(typeArgumentInferenceOrdering.ts, 5, 1))
|
|
}
|
|
|
|
interface I {
|
|
>I : Symbol(I, Decl(typeArgumentInferenceOrdering.ts, 5, 1))
|
|
|
|
x(): Goo;
|
|
>x : Symbol(x, Decl(typeArgumentInferenceOrdering.ts, 7, 13))
|
|
>Goo : Symbol(Goo, Decl(typeArgumentInferenceOrdering.ts, 9, 1))
|
|
}
|
|
|
|
interface Goo {
|
|
>Goo : Symbol(Goo, Decl(typeArgumentInferenceOrdering.ts, 9, 1))
|
|
|
|
p: string;
|
|
>p : Symbol(p, Decl(typeArgumentInferenceOrdering.ts, 11, 15))
|
|
}
|
|
|