40 lines
1.6 KiB
Text
40 lines
1.6 KiB
Text
=== tests/cases/compiler/callOverloads3.ts ===
|
|
function Foo():Foo; // error
|
|
>Foo : Symbol(Foo, Decl(callOverloads3.ts, 0, 0), Decl(callOverloads3.ts, 0, 19), Decl(callOverloads3.ts, 1, 27))
|
|
>Foo : Symbol(Foo, Decl(callOverloads3.ts, 0, 0), Decl(callOverloads3.ts, 0, 19), Decl(callOverloads3.ts, 1, 27))
|
|
|
|
function Foo(s:string):Foo; // error
|
|
>Foo : Symbol(Foo, Decl(callOverloads3.ts, 0, 0), Decl(callOverloads3.ts, 0, 19), Decl(callOverloads3.ts, 1, 27))
|
|
>s : Symbol(s, Decl(callOverloads3.ts, 1, 13))
|
|
>Foo : Symbol(Foo, Decl(callOverloads3.ts, 0, 0), Decl(callOverloads3.ts, 0, 19), Decl(callOverloads3.ts, 1, 27))
|
|
|
|
class Foo { // error
|
|
>Foo : Symbol(Foo, Decl(callOverloads3.ts, 0, 0), Decl(callOverloads3.ts, 0, 19), Decl(callOverloads3.ts, 1, 27))
|
|
|
|
bar1() { /*WScript.Echo("bar1");*/ }
|
|
>bar1 : Symbol(Foo.bar1, Decl(callOverloads3.ts, 2, 11))
|
|
|
|
constructor(x: any) {
|
|
>x : Symbol(x, Decl(callOverloads3.ts, 4, 16))
|
|
|
|
// WScript.Echo("Constructor function has executed");
|
|
}
|
|
}
|
|
//class Foo(s: String);
|
|
|
|
var f1 = new Foo("hey");
|
|
>f1 : Symbol(f1, Decl(callOverloads3.ts, 10, 3))
|
|
>Foo : Symbol(Foo, Decl(callOverloads3.ts, 0, 0), Decl(callOverloads3.ts, 0, 19), Decl(callOverloads3.ts, 1, 27))
|
|
|
|
|
|
f1.bar1();
|
|
>f1.bar1 : Symbol(Foo.bar1, Decl(callOverloads3.ts, 2, 11))
|
|
>f1 : Symbol(f1, Decl(callOverloads3.ts, 10, 3))
|
|
>bar1 : Symbol(Foo.bar1, Decl(callOverloads3.ts, 2, 11))
|
|
|
|
Foo();
|
|
>Foo : Symbol(Foo, Decl(callOverloads3.ts, 0, 0), Decl(callOverloads3.ts, 0, 19), Decl(callOverloads3.ts, 1, 27))
|
|
|
|
Foo("s");
|
|
>Foo : Symbol(Foo, Decl(callOverloads3.ts, 0, 0), Decl(callOverloads3.ts, 0, 19), Decl(callOverloads3.ts, 1, 27))
|
|
|