2014-09-12 22:35:07 +02:00
|
|
|
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.
|
|
|
|
|
|
|
|
|
2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/compiler/collisionArgumentsArrowFunctions.ts (2 errors) ====
|
|
|
|
var f1 = (i: number, ...arguments) => { //arguments is error
|
|
|
|
~~~~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.
|
2014-07-13 01:04:16 +02:00
|
|
|
var arguments: any[]; // no error
|
|
|
|
}
|
|
|
|
var f12 = (arguments: number, ...rest) => { //arguments is error
|
|
|
|
~~~~~~~~~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.
|
2014-07-13 01:04:16 +02:00
|
|
|
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
|
|
|
|
}
|