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

42 lines
1.7 KiB
Plaintext
Raw Normal View History

2014-10-01 02:15:18 +02:00
tests/cases/compiler/callOverloads3.ts(2,10): error TS2300: Duplicate identifier 'Foo'.
tests/cases/compiler/callOverloads3.ts(2,16): error TS2304: Cannot find name 'Foo'.
2014-10-01 02:15:18 +02:00
tests/cases/compiler/callOverloads3.ts(3,10): error TS2300: Duplicate identifier 'Foo'.
tests/cases/compiler/callOverloads3.ts(3,10): error TS2391: Function implementation is missing or not immediately following the declaration.
tests/cases/compiler/callOverloads3.ts(3,24): error TS2304: Cannot find name 'Foo'.
tests/cases/compiler/callOverloads3.ts(4,7): error TS2300: Duplicate identifier 'Foo'.
tests/cases/compiler/callOverloads3.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/callOverloads3.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
~~~
!!! 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() { /*WScript.Echo("bar1");*/ }
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();
Foo();
Foo("s");