Skip to content

Commit e9858de

Browse files
committed
Add test
1 parent 612ed1e commit e9858de

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/cases/compiler/controlFlowArrays.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,4 +147,13 @@ function f15() {
147147
x.push("hello");
148148
}
149149
return x; // string[]
150+
}
151+
152+
function f16() {
153+
let x;
154+
let y;
155+
(x = [], x).push(5);
156+
(x.push("hello"), x).push(true);
157+
((x))[3] = { a: 1 };
158+
return x; // (string | number | boolean | { a: number })[]
150159
}

0 commit comments

Comments
 (0)