2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/compiler/callOverloads2.ts(3,7): error TS2300: Duplicate identifier 'Foo'.
|
|
|
|
tests/cases/compiler/callOverloads2.ts(11,1): error TS2300: Duplicate identifier 'Foo'.
|
|
|
|
tests/cases/compiler/callOverloads2.ts(13,1): error TS2393: Duplicate function implementation.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/callOverloads2.ts(13,10): error TS2389: Function implementation name must be 'Foo'.
|
|
|
|
tests/cases/compiler/callOverloads2.ts(14,1): error TS2393: Duplicate function implementation.
|
|
|
|
tests/cases/compiler/callOverloads2.ts(16,10): error TS2391: Function implementation is missing or not immediately following the declaration.
|
|
|
|
tests/cases/compiler/callOverloads2.ts(24,1): error TS2348: Value of type 'typeof Foo' is not callable. Did you mean to include 'new'?
|
|
|
|
|
|
|
|
|
2014-10-01 02:15:18 +02:00
|
|
|
==== tests/cases/compiler/callOverloads2.ts (7 errors) ====
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
|
|
|
|
class Foo {
|
2014-10-01 02:15:18 +02:00
|
|
|
~~~
|
|
|
|
!!! error TS2300: Duplicate identifier 'Foo'.
|
2014-07-13 01:04:16 +02:00
|
|
|
bar1() { /*WScript.Echo("bar1");*/ }
|
|
|
|
|
|
|
|
constructor(x: any) {
|
|
|
|
// WScript.Echo("Constructor function has executed");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function Foo();
|
2014-10-01 02:15:18 +02:00
|
|
|
~~~~~~~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'Foo'.
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
function F1(s:string) {return s;}
|
2014-10-01 02:15:18 +02:00
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
!!! error TS2393: Duplicate function implementation.
|
2014-07-31 01:27:13 +02:00
|
|
|
~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2389: Function implementation name must be 'Foo'.
|
2014-07-13 01:04:16 +02:00
|
|
|
function F1(a:any) { return a;} // error - duplicate identifier
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2393: Duplicate function implementation.
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
function Goo(s:string); // error - no implementation
|
2014-07-31 01:27:13 +02:00
|
|
|
~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2391: 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();
|
|
|
|
~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2348: Value of type 'typeof Foo' is not callable. Did you mean to include 'new'?
|
2014-07-13 01:04:16 +02:00
|
|
|
|