TypeScript/tests/baselines/reference/callOverloads3.errors.txt
2014-07-31 11:06:42 -07:00

29 lines
791 B
Plaintext

==== tests/cases/compiler/callOverloads3.ts (5 errors) ====
function Foo():Foo;
~~~
!!! Cannot find name 'Foo'.
function Foo(s:string):Foo;
~~~
!!! Function implementation is missing or not immediately following the declaration.
~~~
!!! Cannot find name 'Foo'.
class Foo {
~~~
!!! 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");
~~~~~~~~~~~~~~
!!! Only a void function can be called with the 'new' keyword.
f1.bar1();
Foo();
Foo("s");