TypeScript/tests/cases/compiler/arrayIndexWithArrayFails.ts
Wesley Wigham 4ac8976750
Always check index type validity for all types when an error node is present so we always issue an error (#26789)
* Always check index type validity for all types when an error node is present so we always issue an error

* Change type a bit
2018-09-04 16:00:28 -07:00

3 lines
115 B
TypeScript

declare const arr1: (string | string[])[];
declare const arr2: number[];
const j = arr2[arr1[0]]; // should error