49 lines
No EOL
1.9 KiB
Text
49 lines
No EOL
1.9 KiB
Text
tests/cases/compiler/callOverloads2.ts(3,7): error TS2300: Duplicate identifier 'Foo'.
|
|
tests/cases/compiler/callOverloads2.ts(11,10): error TS2300: Duplicate identifier 'Foo'.
|
|
tests/cases/compiler/callOverloads2.ts(13,10): error TS2389: Function implementation name must be 'Foo'.
|
|
tests/cases/compiler/callOverloads2.ts(13,10): error TS2393: Duplicate function implementation.
|
|
tests/cases/compiler/callOverloads2.ts(14,10): 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'?
|
|
|
|
|
|
==== tests/cases/compiler/callOverloads2.ts (7 errors) ====
|
|
|
|
|
|
class Foo { // error
|
|
~~~
|
|
!!! error TS2300: Duplicate identifier 'Foo'.
|
|
bar1() { /*WScript.Echo("bar1");*/ }
|
|
|
|
constructor(x: any) {
|
|
// WScript.Echo("Constructor function has executed");
|
|
}
|
|
}
|
|
|
|
function Foo(); // error
|
|
~~~
|
|
!!! error TS2300: Duplicate identifier 'Foo'.
|
|
|
|
function F1(s:string) {return s;} // error
|
|
~~
|
|
!!! error TS2389: Function implementation name must be 'Foo'.
|
|
~~
|
|
!!! error TS2393: Duplicate function implementation.
|
|
function F1(a:any) { return a;} // error
|
|
~~
|
|
!!! error TS2393: Duplicate function implementation.
|
|
|
|
function Goo(s:string); // error - no implementation
|
|
~~~
|
|
!!! error TS2391: Function implementation is missing or not immediately following the declaration.
|
|
|
|
declare function Gar(s:String); // expect no error
|
|
|
|
var f1 = new Foo("hey");
|
|
|
|
|
|
f1.bar1();
|
|
Foo();
|
|
~~~~~
|
|
!!! error TS2348: Value of type 'typeof Foo' is not callable. Did you mean to include 'new'?
|
|
|