TypeScript/tests/baselines/reference/callOverloads3.errors.txt
2014-09-11 16:11:08 -07:00

29 lines
861 B
Plaintext

==== tests/cases/compiler/callOverloads3.ts (5 errors) ====
function Foo():Foo;
~~~
!!! error TS2304: Cannot find name 'Foo'.
function Foo(s:string):Foo;
~~~
!!! error TS2391: Function implementation is missing or not immediately following the declaration.
~~~
!!! error TS2304: Cannot find name 'Foo'.
class Foo {
~~~
!!! error TS2300: Duplicate identifier 'Foo'.
bar1() { /*WScript.Echo("bar1");*/ }
constructor(x: any) {
// WScript.Echo("Constructor function has executed");
}
}
//class Foo(s: String);
var f1 = new Foo("hey");
~~~~~~~~~~~~~~
!!! error TS2350: Only a void function can be called with the 'new' keyword.
f1.bar1();
Foo();
Foo("s");