2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/constructorOverloads2.ts ===
|
|
|
|
class FooBase {
|
2015-04-13 23:01:57 +02:00
|
|
|
>FooBase : FooBase, Symbol(FooBase, Decl(constructorOverloads2.ts, 0, 0))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
constructor(s: string);
|
2015-04-13 23:01:57 +02:00
|
|
|
>s : string, Symbol(s, Decl(constructorOverloads2.ts, 1, 16))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
constructor(n: number);
|
2015-04-13 23:01:57 +02:00
|
|
|
>n : number, Symbol(n, Decl(constructorOverloads2.ts, 2, 16))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
constructor(x: any) {
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : any, Symbol(x, Decl(constructorOverloads2.ts, 3, 16))
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
bar1() { /*WScript.Echo("base bar1");*/ }
|
2015-04-13 23:01:57 +02:00
|
|
|
>bar1 : () => void, Symbol(bar1, Decl(constructorOverloads2.ts, 4, 5))
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
class Foo extends FooBase {
|
2015-04-13 23:01:57 +02:00
|
|
|
>Foo : Foo, Symbol(Foo, Decl(constructorOverloads2.ts, 6, 1))
|
|
|
|
>FooBase : FooBase, Symbol(FooBase, Decl(constructorOverloads2.ts, 0, 0))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
constructor(s: string);
|
2015-04-13 23:01:57 +02:00
|
|
|
>s : string, Symbol(s, Decl(constructorOverloads2.ts, 9, 16))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
constructor(n: number);
|
2015-04-13 23:01:57 +02:00
|
|
|
>n : number, Symbol(n, Decl(constructorOverloads2.ts, 10, 16))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
constructor(a:any);
|
2015-04-13 23:01:57 +02:00
|
|
|
>a : any, Symbol(a, Decl(constructorOverloads2.ts, 11, 16))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
constructor(x: any, y?: any) {
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : any, Symbol(x, Decl(constructorOverloads2.ts, 12, 16))
|
|
|
|
>y : any, Symbol(y, Decl(constructorOverloads2.ts, 12, 23))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
super(x);
|
|
|
|
>super(x) : void
|
2015-04-13 23:01:57 +02:00
|
|
|
>super : typeof FooBase, Symbol(FooBase, Decl(constructorOverloads2.ts, 0, 0))
|
|
|
|
>x : any, Symbol(x, Decl(constructorOverloads2.ts, 12, 16))
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
bar1() { /*WScript.Echo("bar1");*/ }
|
2015-04-13 23:01:57 +02:00
|
|
|
>bar1 : () => void, Symbol(bar1, Decl(constructorOverloads2.ts, 14, 5))
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
var f1 = new Foo("hey");
|
2015-04-13 23:01:57 +02:00
|
|
|
>f1 : Foo, Symbol(f1, Decl(constructorOverloads2.ts, 18, 3))
|
2014-08-15 23:33:16 +02:00
|
|
|
>new Foo("hey") : Foo
|
2015-04-13 23:01:57 +02:00
|
|
|
>Foo : typeof Foo, Symbol(Foo, Decl(constructorOverloads2.ts, 6, 1))
|
2015-04-13 21:36:11 +02:00
|
|
|
>"hey" : string
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var f2 = new Foo(0);
|
2015-04-13 23:01:57 +02:00
|
|
|
>f2 : Foo, Symbol(f2, Decl(constructorOverloads2.ts, 19, 3))
|
2014-08-15 23:33:16 +02:00
|
|
|
>new Foo(0) : Foo
|
2015-04-13 23:01:57 +02:00
|
|
|
>Foo : typeof Foo, Symbol(Foo, Decl(constructorOverloads2.ts, 6, 1))
|
2015-04-13 21:36:11 +02:00
|
|
|
>0 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var f3 = new Foo(f1);
|
2015-04-13 23:01:57 +02:00
|
|
|
>f3 : Foo, Symbol(f3, Decl(constructorOverloads2.ts, 20, 3))
|
2014-08-15 23:33:16 +02:00
|
|
|
>new Foo(f1) : Foo
|
2015-04-13 23:01:57 +02:00
|
|
|
>Foo : typeof Foo, Symbol(Foo, Decl(constructorOverloads2.ts, 6, 1))
|
|
|
|
>f1 : Foo, Symbol(f1, Decl(constructorOverloads2.ts, 18, 3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var f4 = new Foo([f1,f2,f3]);
|
2015-04-13 23:01:57 +02:00
|
|
|
>f4 : Foo, Symbol(f4, Decl(constructorOverloads2.ts, 21, 3))
|
2014-08-15 23:33:16 +02:00
|
|
|
>new Foo([f1,f2,f3]) : Foo
|
2015-04-13 23:01:57 +02:00
|
|
|
>Foo : typeof Foo, Symbol(Foo, Decl(constructorOverloads2.ts, 6, 1))
|
2014-08-15 23:33:16 +02:00
|
|
|
>[f1,f2,f3] : Foo[]
|
2015-04-13 23:01:57 +02:00
|
|
|
>f1 : Foo, Symbol(f1, Decl(constructorOverloads2.ts, 18, 3))
|
|
|
|
>f2 : Foo, Symbol(f2, Decl(constructorOverloads2.ts, 19, 3))
|
|
|
|
>f3 : Foo, Symbol(f3, Decl(constructorOverloads2.ts, 20, 3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
f1.bar1();
|
|
|
|
>f1.bar1() : void
|
2015-04-13 23:01:57 +02:00
|
|
|
>f1.bar1 : () => void, Symbol(Foo.bar1, Decl(constructorOverloads2.ts, 14, 5))
|
|
|
|
>f1 : Foo, Symbol(f1, Decl(constructorOverloads2.ts, 18, 3))
|
|
|
|
>bar1 : () => void, Symbol(Foo.bar1, Decl(constructorOverloads2.ts, 14, 5))
|
2014-08-15 23:33:16 +02:00
|
|
|
|