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

43 lines
1.7 KiB
Plaintext
Raw Normal View History

2014-10-01 02:15:18 +02:00
tests/cases/compiler/callOverloads5.ts(1,10): error TS2300: Duplicate identifier 'Foo'.
tests/cases/compiler/callOverloads5.ts(1,16): error TS2304: Cannot find name 'Foo'.
2014-10-01 02:15:18 +02:00
tests/cases/compiler/callOverloads5.ts(2,10): error TS2300: Duplicate identifier '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.
2014-10-01 02:15:18 +02:00
==== tests/cases/compiler/callOverloads5.ts (7 errors) ====
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
~~~
!!! 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'.
~~~
!!! error TS2391: Function implementation is missing or not immediately following the declaration.
2014-07-13 01:04:16 +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
~~~
!!! error TS2300: Duplicate identifier 'Foo'.
2014-07-13 01:04:16 +02:00
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.
2014-07-13 01:04:16 +02:00
f1.bar1("a");
Foo();
Foo("s");