diff --git a/tests/baselines/reference/shadowingViaLocalValueOrBindingElement.errors.txt b/tests/baselines/reference/shadowingViaLocalValueOrBindingElement.errors.txt index 663f83c1ffb..4fc1d47c383 100644 --- a/tests/baselines/reference/shadowingViaLocalValueOrBindingElement.errors.txt +++ b/tests/baselines/reference/shadowingViaLocalValueOrBindingElement.errors.txt @@ -18,10 +18,10 @@ tests/cases/compiler/shadowingViaLocalValueOrBindingElement.ts(8,18): error TS24 var { x: x = 0 } = { x: 0 }; // Error ~ !!! error TS2481: Cannot initialize outer scoped variable 'x' in the same scope as block scoped declaration 'x'. - var { x } = { x: 0 }; // No error, even though the let x is being initialized + var { x } = { x: 0 }; // Error ~ !!! error TS2481: Cannot initialize outer scoped variable 'x' in the same scope as block scoped declaration 'x'. - var { x: x } = { x: 0 }; // No error, even though the let x is being initialized + var { x: x } = { x: 0 }; // Error ~ !!! error TS2481: Cannot initialize outer scoped variable 'x' in the same scope as block scoped declaration 'x'. } diff --git a/tests/baselines/reference/shadowingViaLocalValueOrBindingElement.js b/tests/baselines/reference/shadowingViaLocalValueOrBindingElement.js index 8d6319f5ea7..76c4a7ac3a6 100644 --- a/tests/baselines/reference/shadowingViaLocalValueOrBindingElement.js +++ b/tests/baselines/reference/shadowingViaLocalValueOrBindingElement.js @@ -5,8 +5,8 @@ if (true) { var x = 0; // Error var { x = 0 } = { x: 0 }; // Error var { x: x = 0 } = { x: 0 }; // Error - var { x } = { x: 0 }; // No error, even though the let x is being initialized - var { x: x } = { x: 0 }; // No error, even though the let x is being initialized + var { x } = { x: 0 }; // Error + var { x: x } = { x: 0 }; // Error } } @@ -23,9 +23,9 @@ if (true) { }).x, x = _b === void 0 ? 0 : _b; // Error var x = ({ _x: 0 - }).x; // No error, even though the let x is being initialized + }).x; // Error var x = ({ _x: 0 - }).x; // No error, even though the let x is being initialized + }).x; // Error } }