25 lines
1.2 KiB
Plaintext
25 lines
1.2 KiB
Plaintext
tests/cases/compiler/collisionArgumentsArrowFunctions.ts(1,22): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.
|
|
tests/cases/compiler/collisionArgumentsArrowFunctions.ts(4,12): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.
|
|
|
|
|
|
==== tests/cases/compiler/collisionArgumentsArrowFunctions.ts (2 errors) ====
|
|
var f1 = (i: number, ...arguments) => { //arguments is error
|
|
~~~~~~~~~~~~
|
|
!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.
|
|
var arguments: any[]; // no error
|
|
}
|
|
var f12 = (arguments: number, ...rest) => { //arguments is error
|
|
~~~~~~~~~~~~~~~~~
|
|
!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.
|
|
var arguments = 10; // no error
|
|
}
|
|
var f1NoError = (arguments: number) => { // no error
|
|
var arguments = 10; // no error
|
|
}
|
|
|
|
var f2 = (...restParameters) => {
|
|
var arguments = 10; // No Error
|
|
}
|
|
var f2NoError = () => {
|
|
var arguments = 10; // no error
|
|
} |