TypeScript/tests/baselines/reference/callOverloads3.errors.txt

29 lines
791 B
Plaintext
Raw Normal View History

2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/callOverloads3.ts (5 errors) ====
function Foo():Foo;
~~~
!!! Cannot find name 'Foo'.
function Foo(s:string):Foo;
2014-07-31 01:27:13 +02:00
~~~
!!! Function implementation is missing or not immediately following the declaration.
2014-07-13 01:04:16 +02:00
~~~
!!! 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");