mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 02:33:53 -06:00
accepted baselines
This commit is contained in:
parent
db324db202
commit
d163205da6
@ -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'.
|
||||
}
|
||||
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user