35 lines
1 KiB
Text
35 lines
1 KiB
Text
|
=== tests/cases/compiler/collisionRestParameterArrowFunctions.ts ===
|
||
|
var f1 = (_i: number, ...restParameters) => { //_i is error
|
||
|
>f1 : (_i: number, ...restParameters: any[]) => void
|
||
|
>(_i: number, ...restParameters) => { //_i is error var _i = 10; // no error} : (_i: number, ...restParameters: any[]) => void
|
||
|
>_i : number
|
||
|
>restParameters : any[]
|
||
|
|
||
|
var _i = 10; // no error
|
||
|
>_i : number
|
||
|
}
|
||
|
var f1NoError = (_i: number) => { // no error
|
||
|
>f1NoError : (_i: number) => void
|
||
|
>(_i: number) => { // no error var _i = 10; // no error} : (_i: number) => void
|
||
|
>_i : number
|
||
|
|
||
|
var _i = 10; // no error
|
||
|
>_i : number
|
||
|
}
|
||
|
|
||
|
var f2 = (...restParameters) => {
|
||
|
>f2 : (...restParameters: any[]) => void
|
||
|
>(...restParameters) => { var _i = 10; // No Error} : (...restParameters: any[]) => void
|
||
|
>restParameters : any[]
|
||
|
|
||
|
var _i = 10; // No Error
|
||
|
>_i : number
|
||
|
}
|
||
|
var f2NoError = () => {
|
||
|
>f2NoError : () => void
|
||
|
>() => { var _i = 10; // no error} : () => void
|
||
|
|
||
|
var _i = 10; // no error
|
||
|
>_i : number
|
||
|
}
|