mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
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
This commit is contained in:
3
tests/cases/compiler/arrayIndexWithArrayFails.ts
Normal file
3
tests/cases/compiler/arrayIndexWithArrayFails.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
declare const arr1: (string | string[])[];
|
||||
declare const arr2: number[];
|
||||
const j = arr2[arr1[0]]; // should error
|
||||
Reference in New Issue
Block a user