29 lines
1.3 KiB
Text
29 lines
1.3 KiB
Text
=== tests/cases/compiler/inferSecondaryParameter.ts ===
|
|
// type inference on 'bug' should give 'any'
|
|
|
|
interface Ib { m(test: string, fn: Function); }
|
|
>Ib : Symbol(Ib, Decl(inferSecondaryParameter.ts, 0, 0))
|
|
>m : Symbol(m, Decl(inferSecondaryParameter.ts, 2, 14))
|
|
>test : Symbol(test, Decl(inferSecondaryParameter.ts, 2, 17))
|
|
>fn : Symbol(fn, Decl(inferSecondaryParameter.ts, 2, 30))
|
|
>Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11))
|
|
|
|
var b: Ib = { m: function (test: string, fn: Function) { } };
|
|
>b : Symbol(b, Decl(inferSecondaryParameter.ts, 4, 3))
|
|
>Ib : Symbol(Ib, Decl(inferSecondaryParameter.ts, 0, 0))
|
|
>m : Symbol(m, Decl(inferSecondaryParameter.ts, 4, 13))
|
|
>test : Symbol(test, Decl(inferSecondaryParameter.ts, 4, 27))
|
|
>fn : Symbol(fn, Decl(inferSecondaryParameter.ts, 4, 40))
|
|
>Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11))
|
|
|
|
b.m("test", function (bug) {
|
|
>b.m : Symbol(Ib.m, Decl(inferSecondaryParameter.ts, 2, 14))
|
|
>b : Symbol(b, Decl(inferSecondaryParameter.ts, 4, 3))
|
|
>m : Symbol(Ib.m, Decl(inferSecondaryParameter.ts, 2, 14))
|
|
>bug : Symbol(bug, Decl(inferSecondaryParameter.ts, 6, 22))
|
|
|
|
var a: number = bug;
|
|
>a : Symbol(a, Decl(inferSecondaryParameter.ts, 7, 7))
|
|
>bug : Symbol(bug, Decl(inferSecondaryParameter.ts, 6, 22))
|
|
|
|
});
|