2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/compiler/callOverloads4.ts(2,10): error TS2300: Duplicate identifier 'Foo'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/callOverloads4.ts(2,16): error TS2304: Cannot find name 'Foo'.
|
2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/compiler/callOverloads4.ts(3,10): error TS2300: Duplicate identifier 'Foo'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/callOverloads4.ts(3,10): error TS2391: Function implementation is missing or not immediately following the declaration.
|
|
|
|
tests/cases/compiler/callOverloads4.ts(3,24): error TS2304: Cannot find name 'Foo'.
|
|
|
|
tests/cases/compiler/callOverloads4.ts(4,7): error TS2300: Duplicate identifier 'Foo'.
|
|
|
|
tests/cases/compiler/callOverloads4.ts(12,10): error TS2350: Only a void function can be called with the 'new' keyword.
|
|
|
|
|
|
|
|
|
2014-10-01 02:15:18 +02:00
|
|
|
==== tests/cases/compiler/callOverloads4.ts (7 errors) ====
|
2014-07-13 01:04:16 +02:00
|
|
|
|
2014-10-01 20:27:20 +02:00
|
|
|
function Foo():Foo; // error
|
2014-10-01 02:15:18 +02:00
|
|
|
~~~
|
|
|
|
!!! error TS2300: Duplicate identifier 'Foo'.
|
2014-07-13 01:04:16 +02:00
|
|
|
~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'Foo'.
|
2014-10-01 20:27:20 +02:00
|
|
|
function Foo(s:string):Foo; // error
|
2014-07-31 01:27:13 +02:00
|
|
|
~~~
|
2014-10-01 02:15:18 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'Foo'.
|
|
|
|
~~~
|
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
|
|
|
~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'Foo'.
|
2014-10-01 20:27:20 +02:00
|
|
|
class Foo { // error
|
2014-07-13 01:04:16 +02:00
|
|
|
~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'Foo'.
|
2014-07-13 01:04:16 +02:00
|
|
|
bar1() { /*WScript.Echo("bar1");*/ }
|
|
|
|
constructor(s: string);
|
|
|
|
constructor(x: any) {
|
|
|
|
// WScript.Echo("Constructor function has executed");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var f1 = new Foo("hey");
|
|
|
|
~~~~~~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2350: Only a void function can be called with the 'new' keyword.
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
|
|
|
|
f1.bar1();
|
|
|
|
Foo();
|
|
|
|
Foo("s");
|
|
|
|
|