1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
tests/cases/compiler/callOverloads4.ts(1,10): error TS2300: Duplicate identifier 'Foo'.
tests/cases/compiler/callOverloads4.ts(1,16): error TS2304: Cannot find name 'Foo'.
tests/cases/compiler/callOverloads4.ts(2,10): error TS2300: Duplicate identifier 'Foo'.
tests/cases/compiler/callOverloads4.ts(2,10): error TS2391: Function implementation is missing or not immediately following the declaration.
tests/cases/compiler/callOverloads4.ts(2,24): error TS2304: Cannot find name 'Foo'.
tests/cases/compiler/callOverloads4.ts(3,7): error TS2300: Duplicate identifier 'Foo'.
tests/cases/compiler/callOverloads4.ts(11,10): error TS2350: Only a void function can be called with the 'new' keyword.
==== tests/cases/compiler/callOverloads4.ts (7 errors) ====
function Foo():Foo; // error
~~~
!!! error TS2300: Duplicate identifier 'Foo'.
~~~
!!! error TS2304: Cannot find name 'Foo'.
function Foo(s:string):Foo; // error
~~~
!!! error TS2300: Duplicate identifier 'Foo'.
~~~
!!! error TS2391: Function implementation is missing or not immediately following the declaration.
~~~
!!! error TS2304: Cannot find name 'Foo'.
class Foo { // error
~~~
!!! error TS2300: Duplicate identifier 'Foo'.
bar1() { /*WScript.Echo("bar1");*/ }
constructor(s: string);
constructor(x: any) {
// WScript.Echo("Constructor function has executed");
}
}
var f1 = new Foo("hey");
~~~~~~~~~~~~~~
!!! error TS2350: Only a void function can be called with the 'new' keyword.
f1.bar1();
Foo();
Foo("s");
|