mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
11 lines
310 B
TypeScript
11 lines
310 B
TypeScript
//// [tests/cases/compiler/arrayIndexWithArrayFails.ts] ////
|
|
|
|
//// [arrayIndexWithArrayFails.ts]
|
|
declare const arr1: (string | string[])[];
|
|
declare const arr2: number[];
|
|
const j = arr2[arr1[0]]; // should error
|
|
|
|
//// [arrayIndexWithArrayFails.js]
|
|
"use strict";
|
|
const j = arr2[arr1[0]]; // should error
|