mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
15 lines
537 B
Plaintext
15 lines
537 B
Plaintext
//// [tests/cases/compiler/arrayIndexWithArrayFails.ts] ////
|
|
|
|
=== arrayIndexWithArrayFails.ts ===
|
|
declare const arr1: (string | string[])[];
|
|
>arr1 : Symbol(arr1, Decl(arrayIndexWithArrayFails.ts, 0, 13))
|
|
|
|
declare const arr2: number[];
|
|
>arr2 : Symbol(arr2, Decl(arrayIndexWithArrayFails.ts, 1, 13))
|
|
|
|
const j = arr2[arr1[0]]; // should error
|
|
>j : Symbol(j, Decl(arrayIndexWithArrayFails.ts, 2, 5))
|
|
>arr2 : Symbol(arr2, Decl(arrayIndexWithArrayFails.ts, 1, 13))
|
|
>arr1 : Symbol(arr1, Decl(arrayIndexWithArrayFails.ts, 0, 13))
|
|
|