TypeScript/tests/baselines/reference/collisionArgumentsArrowFunctions.errors.txt
2014-07-12 17:30:19 -07:00

21 lines
852 B
Plaintext

==== tests/cases/compiler/collisionArgumentsArrowFunctions.ts (2 errors) ====
var f1 = (i: number, ...arguments) => { //arguments is error
~~~~~~~~~~~~
!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.
var arguments: any[]; // no error
}
var f12 = (arguments: number, ...rest) => { //arguments is error
~~~~~~~~~~~~~~~~~
!!! 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
}