2014-11-29 03:33:37 +01:00
|
|
|
=== tests/cases/compiler/collisionRestParameterArrowFunctions.ts ===
|
|
|
|
var f1 = (_i: number, ...restParameters) => { //_i is error
|
2015-04-13 23:01:57 +02:00
|
|
|
>f1 : (_i: number, ...restParameters: any[]) => void, Symbol(f1, Decl(collisionRestParameterArrowFunctions.ts, 0, 3))
|
2014-11-29 03:33:37 +01:00
|
|
|
>(_i: number, ...restParameters) => { //_i is error var _i = 10; // no error} : (_i: number, ...restParameters: any[]) => void
|
2015-04-13 23:01:57 +02:00
|
|
|
>_i : number, Symbol(_i, Decl(collisionRestParameterArrowFunctions.ts, 0, 10), Decl(collisionRestParameterArrowFunctions.ts, 1, 7))
|
|
|
|
>restParameters : any[], Symbol(restParameters, Decl(collisionRestParameterArrowFunctions.ts, 0, 21))
|
2014-11-29 03:33:37 +01:00
|
|
|
|
|
|
|
var _i = 10; // no error
|
2015-04-13 23:01:57 +02:00
|
|
|
>_i : number, Symbol(_i, Decl(collisionRestParameterArrowFunctions.ts, 0, 10), Decl(collisionRestParameterArrowFunctions.ts, 1, 7))
|
2015-04-13 21:36:11 +02:00
|
|
|
>10 : number
|
2014-11-29 03:33:37 +01:00
|
|
|
}
|
|
|
|
var f1NoError = (_i: number) => { // no error
|
2015-04-13 23:01:57 +02:00
|
|
|
>f1NoError : (_i: number) => void, Symbol(f1NoError, Decl(collisionRestParameterArrowFunctions.ts, 3, 3))
|
2014-11-29 03:33:37 +01:00
|
|
|
>(_i: number) => { // no error var _i = 10; // no error} : (_i: number) => void
|
2015-04-13 23:01:57 +02:00
|
|
|
>_i : number, Symbol(_i, Decl(collisionRestParameterArrowFunctions.ts, 3, 17), Decl(collisionRestParameterArrowFunctions.ts, 4, 7))
|
2014-11-29 03:33:37 +01:00
|
|
|
|
|
|
|
var _i = 10; // no error
|
2015-04-13 23:01:57 +02:00
|
|
|
>_i : number, Symbol(_i, Decl(collisionRestParameterArrowFunctions.ts, 3, 17), Decl(collisionRestParameterArrowFunctions.ts, 4, 7))
|
2015-04-13 21:36:11 +02:00
|
|
|
>10 : number
|
2014-11-29 03:33:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
var f2 = (...restParameters) => {
|
2015-04-13 23:01:57 +02:00
|
|
|
>f2 : (...restParameters: any[]) => void, Symbol(f2, Decl(collisionRestParameterArrowFunctions.ts, 7, 3))
|
2014-11-29 03:33:37 +01:00
|
|
|
>(...restParameters) => { var _i = 10; // No Error} : (...restParameters: any[]) => void
|
2015-04-13 23:01:57 +02:00
|
|
|
>restParameters : any[], Symbol(restParameters, Decl(collisionRestParameterArrowFunctions.ts, 7, 10))
|
2014-11-29 03:33:37 +01:00
|
|
|
|
|
|
|
var _i = 10; // No Error
|
2015-04-13 23:01:57 +02:00
|
|
|
>_i : number, Symbol(_i, Decl(collisionRestParameterArrowFunctions.ts, 8, 7))
|
2015-04-13 21:36:11 +02:00
|
|
|
>10 : number
|
2014-11-29 03:33:37 +01:00
|
|
|
}
|
|
|
|
var f2NoError = () => {
|
2015-04-13 23:01:57 +02:00
|
|
|
>f2NoError : () => void, Symbol(f2NoError, Decl(collisionRestParameterArrowFunctions.ts, 10, 3))
|
2014-11-29 03:33:37 +01:00
|
|
|
>() => { var _i = 10; // no error} : () => void
|
|
|
|
|
|
|
|
var _i = 10; // no error
|
2015-04-13 23:01:57 +02:00
|
|
|
>_i : number, Symbol(_i, Decl(collisionRestParameterArrowFunctions.ts, 11, 7))
|
2015-04-13 21:36:11 +02:00
|
|
|
>10 : number
|
2014-11-29 03:33:37 +01:00
|
|
|
}
|