mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
63 lines
2.1 KiB
Plaintext
63 lines
2.1 KiB
Plaintext
functionNameConflicts.ts(5,14): error TS2300: Duplicate identifier 'fn1'.
|
|
functionNameConflicts.ts(6,9): error TS2300: Duplicate identifier 'fn1'.
|
|
functionNameConflicts.ts(8,9): error TS2300: Duplicate identifier 'fn2'.
|
|
functionNameConflicts.ts(9,14): error TS2300: Duplicate identifier 'fn2'.
|
|
functionNameConflicts.ts(12,10): error TS2300: Duplicate identifier 'fn3'.
|
|
functionNameConflicts.ts(13,5): error TS2300: Duplicate identifier 'fn3'.
|
|
functionNameConflicts.ts(16,9): error TS2300: Duplicate identifier 'fn4'.
|
|
functionNameConflicts.ts(17,14): error TS2300: Duplicate identifier 'fn4'.
|
|
functionNameConflicts.ts(19,14): error TS2300: Duplicate identifier 'fn5'.
|
|
functionNameConflicts.ts(20,9): error TS2300: Duplicate identifier 'fn5'.
|
|
functionNameConflicts.ts(24,10): error TS2389: Function implementation name must be 'over'.
|
|
|
|
|
|
==== functionNameConflicts.ts (11 errors) ====
|
|
//Function and variable of the same name in same declaration space
|
|
//Function overload with different name from implementation signature
|
|
|
|
namespace M {
|
|
function fn1() { }
|
|
~~~
|
|
!!! error TS2300: Duplicate identifier 'fn1'.
|
|
var fn1;
|
|
~~~
|
|
!!! error TS2300: Duplicate identifier 'fn1'.
|
|
|
|
var fn2;
|
|
~~~
|
|
!!! error TS2300: Duplicate identifier 'fn2'.
|
|
function fn2() { }
|
|
~~~
|
|
!!! error TS2300: Duplicate identifier 'fn2'.
|
|
}
|
|
|
|
function fn3() { }
|
|
~~~
|
|
!!! error TS2300: Duplicate identifier 'fn3'.
|
|
var fn3;
|
|
~~~
|
|
!!! error TS2300: Duplicate identifier 'fn3'.
|
|
|
|
function func() {
|
|
var fn4;
|
|
~~~
|
|
!!! error TS2300: Duplicate identifier 'fn4'.
|
|
function fn4() { }
|
|
~~~
|
|
!!! error TS2300: Duplicate identifier 'fn4'.
|
|
|
|
function fn5() { }
|
|
~~~
|
|
!!! error TS2300: Duplicate identifier 'fn5'.
|
|
var fn5;
|
|
~~~
|
|
!!! error TS2300: Duplicate identifier 'fn5'.
|
|
}
|
|
|
|
function over();
|
|
function overrr() {
|
|
~~~~~~
|
|
!!! error TS2389: Function implementation name must be 'over'.
|
|
|
|
}
|
|
|