19 lines
340 B
Plaintext
19 lines
340 B
Plaintext
|
=== 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
|
||
|
|
||
|
function bar(a = v[1 + 1]) {
|
||
|
>bar : (a?: any) => void
|
||
|
>a : any
|
||
|
>v[1 + 1] : any
|
||
|
>v : any[]
|
||
|
>1 + 1 : number
|
||
|
}
|