diff --git a/tests/baselines/reference/asyncWithVarShadowing_es6.js b/tests/baselines/reference/asyncWithVarShadowing_es6.js index e362a74072d..392bed9d294 100644 --- a/tests/baselines/reference/asyncWithVarShadowing_es6.js +++ b/tests/baselines/reference/asyncWithVarShadowing_es6.js @@ -210,7 +210,17 @@ async function fn39(x) { var x; break foo; } -} +} + +async function fn40(x) { + try { + + } + catch { + var x; + } +} + //// [asyncWithVarShadowing_es6.js] function fn1(x) { @@ -476,3 +486,12 @@ function fn39(x) { }); var x; } +function fn40(x) { + return __awaiter(this, void 0, void 0, function* () { + try { + } + catch (_a) { + } + }); + var x; +} diff --git a/tests/baselines/reference/asyncWithVarShadowing_es6.symbols b/tests/baselines/reference/asyncWithVarShadowing_es6.symbols index f3fd27e8971..ff95648722f 100644 --- a/tests/baselines/reference/asyncWithVarShadowing_es6.symbols +++ b/tests/baselines/reference/asyncWithVarShadowing_es6.symbols @@ -416,3 +416,17 @@ async function fn39(x) { break foo; } } + +async function fn40(x) { +>fn40 : Symbol(fn40, Decl(asyncWithVarShadowing_es6.ts, 211, 1)) +>x : Symbol(x, Decl(asyncWithVarShadowing_es6.ts, 213, 20), Decl(asyncWithVarShadowing_es6.ts, 218, 11)) + + try { + + } + catch { + var x; +>x : Symbol(x, Decl(asyncWithVarShadowing_es6.ts, 213, 20), Decl(asyncWithVarShadowing_es6.ts, 218, 11)) + } +} + diff --git a/tests/baselines/reference/asyncWithVarShadowing_es6.types b/tests/baselines/reference/asyncWithVarShadowing_es6.types index 5544c8be2c6..f87e452b2a1 100644 --- a/tests/baselines/reference/asyncWithVarShadowing_es6.types +++ b/tests/baselines/reference/asyncWithVarShadowing_es6.types @@ -423,3 +423,17 @@ async function fn39(x) { >foo : any } } + +async function fn40(x) { +>fn40 : (x: any) => Promise +>x : any + + try { + + } + catch { + var x; +>x : any + } +} + diff --git a/tests/cases/conformance/async/es6/asyncWithVarShadowing_es6.ts b/tests/cases/conformance/async/es6/asyncWithVarShadowing_es6.ts index 7c9a9846376..9083246dd18 100644 --- a/tests/cases/conformance/async/es6/asyncWithVarShadowing_es6.ts +++ b/tests/cases/conformance/async/es6/asyncWithVarShadowing_es6.ts @@ -211,4 +211,13 @@ async function fn39(x) { var x; break foo; } -} \ No newline at end of file +} + +async function fn40(x) { + try { + + } + catch { + var x; + } +}