TypeScript/tests/cases/compiler/deeplyDependentLargeArrayMutation.ts
Wesley Wigham 5e8b63cd1d
Use context free expression types in evolving array checking and cache context free type (#26585)
* Use context free expression types in evolving array checking and cache context free type

* Simplify second test

* Low max depth a tad just so node 8 wont stack out

* By request make flow control a round number
2018-08-22 16:17:42 -07:00

35 lines
965 B
TypeScript

// @allowJs: true
// @checkJs: true
// @noEmit: true
// @target: es6
// @filename: foo.js
// repro from #26031
function build() {
var arr = [];
arr[arr.length] = 'value';
arr[arr.length] = 'value';
arr[arr.length] = 'value';
arr[arr.length] = 'value';
arr[arr.length] = 'value';
arr[arr.length] = 'value';
arr[arr.length] = 'value';
arr[arr.length] = 'value';
arr[arr.length] = 'value';
arr[arr.length] = 'value';
arr[arr.length] = 'value';
arr[arr.length] = 'value';
arr[arr.length] = 'value';
arr[arr.length] = 'value';
arr[arr.length] = 'value';
arr[arr.length] = 'value';
arr[arr.length] = 'value';
arr[arr.length] = 'value';
arr[arr.length] = 'value';
arr[arr.length] = 'value';
arr[arr.length] = 'value';
arr[arr.length] = 'value';
arr[arr.length] = 'value';
arr[arr.length] = 'value';
arr[arr.length] = 'value';
}