fix let var assignments

This commit is contained in:
Dmitry Vasilev
2023-10-31 12:38:35 +08:00
parent b88070ffc9
commit a649352015
2 changed files with 26 additions and 10 deletions

View File

@@ -1555,6 +1555,25 @@ export const tests = [
)
}),
test('block scoping shadow bug', () => {
assert_code_evals_to(
`
let y = 3
if(true) {
let y
y = 1
if(true) {
let y
y = 2
}
y
}
y
`,
3
)
}),
test('step_into', () => {
const code = `
const x = () => 1;