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

36 lines
1 KiB
Plaintext

==== tests/cases/compiler/callOverloads2.ts (5 errors) ====
class Foo {
bar1() { /*WScript.Echo("bar1");*/ }
constructor(x: any) {
// WScript.Echo("Constructor function has executed");
}
}
function Foo();
~~~
!!! error TS2300: Duplicate identifier 'Foo'.
function F1(s:string) {return s;}
~~
!!! error TS2389: Function implementation name must be 'Foo'.
function F1(a:any) { return a;} // error - duplicate identifier
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2393: Duplicate function implementation.
function Goo(s:string); // error - no implementation
~~~
!!! error TS2391: Function implementation is missing or not immediately following the declaration.
declare function Gar(s:String); // expect no error
var f1 = new Foo("hey");
f1.bar1();
Foo();
~~~~~
!!! error TS2348: Value of type 'typeof Foo' is not callable. Did you mean to include 'new'?