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

36 lines
999 B
Plaintext
Raw Normal View History

2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/callOverloads2.ts (5 errors) ====
class Foo {
bar1() { /*WScript.Echo("bar1");*/ }
constructor(x: any) {
// WScript.Echo("Constructor function has executed");
}
}
function Foo();
~~~
!!! Duplicate identifier 'Foo'.
function F1(s:string) {return s;}
2014-07-31 01:27:13 +02:00
~~
!!! Function implementation name must be 'Foo'.
2014-07-13 01:04:16 +02:00
function F1(a:any) { return a;} // error - duplicate identifier
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! Duplicate function implementation.
function Goo(s:string); // error - no implementation
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
declare function Gar(s:String); // expect no error
var f1 = new Foo("hey");
f1.bar1();
Foo();
~~~~~
!!! Value of type 'typeof Foo' is not callable. Did you mean to include 'new'?