22 lines
392 B
Text
22 lines
392 B
Text
=== tests/cases/compiler/functionWithDefaultParameterWithNoStatements14.ts ===
|
|
var v: any[];
|
|
>v : any[]
|
|
|
|
function foo(a = v[1 + 1]) { }
|
|
>foo : (a?: any) => void
|
|
>a : any
|
|
>v[1 + 1] : any
|
|
>v : any[]
|
|
>1 + 1 : number
|
|
>1 : number
|
|
>1 : number
|
|
|
|
function bar(a = v[1 + 1]) {
|
|
>bar : (a?: any) => void
|
|
>a : any
|
|
>v[1 + 1] : any
|
|
>v : any[]
|
|
>1 + 1 : number
|
|
>1 : number
|
|
>1 : number
|
|
}
|