Skip to content

Commit 9223f39

Browse files
committed
Add regression test
1 parent 7cdc65b commit 9223f39

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/cases/conformance/es6/destructuring/destructuringControlFlow.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,9 @@ function f4() {
3434
({ ["x"]: x } = 0); // Error
3535
({ ["x" + ""]: x } = 0); // Errpr
3636
}
37+
38+
// Repro from #31770
39+
40+
type KeyValue = [string, string?];
41+
let [key, value]: KeyValue = ["foo"];
42+
value.toUpperCase(); // Error

0 commit comments

Comments
 (0)