29 lines
No EOL
759 B
Text
29 lines
No EOL
759 B
Text
==== tests/cases/compiler/callOverloads3.ts (5 errors) ====
|
|
|
|
function Foo():Foo;
|
|
~~~
|
|
!!! Cannot find name 'Foo'.
|
|
function Foo(s:string):Foo;
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
!!! Function implementation expected.
|
|
~~~
|
|
!!! 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");
|
|
|