TypeScript/tests/baselines/reference/mixedPropertyElementAccessAssignmentDeclaration.types
Nathan Shively-Sanders 1cbbe288ac
Treat any mix of element/prop access as declaration in JS (#34649)
Fixes #34642 but, notably, doesn't actually make the assignment into a
working declaration. It just fixes the crash.
2019-10-22 11:28:28 -07:00

18 lines
331 B
Plaintext

=== tests/cases/conformance/salsa/mixedPropertyElementAccessAssignmentDeclaration.ts ===
// Should not crash: #34642
var arr = [];
>arr : any[]
>[] : undefined[]
arr[0].prop[2] = {};
>arr[0].prop[2] = {} : {}
>arr[0].prop[2] : any
>arr[0].prop : any
>arr[0] : any
>arr : any[]
>0 : 0
>prop : any
>2 : 2
>{} : {}