mirror of
https://github.com/swc-project/swc.git
synced 2024-12-21 04:32:01 +03:00
16 lines
429 B
TypeScript
16 lines
429 B
TypeScript
// @downlevelIteration: true
|
|
// https://github.com/microsoft/TypeScript/issues/30083
|
|
|
|
for (const i of [0, 1, 2, 3, 4]) {
|
|
try {
|
|
// Ensure catch binding for the following loop is reset per iteration:
|
|
for (const j of [1, 2, 3]) {
|
|
if (i === 2) {
|
|
throw new Error('ERR');
|
|
}
|
|
}
|
|
console.log(i);
|
|
} catch (err) {
|
|
console.log('E %s %s', i, err);
|
|
}
|
|
} |