From d202b1c037634939003b88fec921465969dec028 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sat, 8 Oct 2016 15:27:49 -0700 Subject: [PATCH] Add test --- tests/cases/compiler/controlFlowArrays.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/cases/compiler/controlFlowArrays.ts b/tests/cases/compiler/controlFlowArrays.ts index d5eaa9c4320..781b8c09d12 100644 --- a/tests/cases/compiler/controlFlowArrays.ts +++ b/tests/cases/compiler/controlFlowArrays.ts @@ -138,4 +138,13 @@ function f14() { x.push("hello"); x.push(true); return x; // (string | number | boolean)[] +} + +function f15() { + let x = []; + while (cond()) { + while (cond()) {} + x.push("hello"); + } + return x; // string[] } \ No newline at end of file