TypeScript/tests/baselines/reference/callOverloads5.errors.txt
2014-09-12 13:35:07 -07:00

37 lines
No EOL
1.4 KiB
Text

tests/cases/compiler/callOverloads5.ts(1,16): error TS2304: Cannot find name 'Foo'.
tests/cases/compiler/callOverloads5.ts(2,10): error TS2391: Function implementation is missing or not immediately following the declaration.
tests/cases/compiler/callOverloads5.ts(2,24): error TS2304: Cannot find name 'Foo'.
tests/cases/compiler/callOverloads5.ts(3,7): error TS2300: Duplicate identifier 'Foo'.
tests/cases/compiler/callOverloads5.ts(13,10): error TS2350: Only a void function can be called with the 'new' keyword.
==== tests/cases/compiler/callOverloads5.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(s:string);
bar1(n:number);
bar1(a:any) { /*WScript.Echo(a);*/ }
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("a");
Foo();
Foo("s");