mirror of
https://github.com/leporello-js/leporello-js
synced 2026-01-13 21:14:28 -08:00
fix let var assignments
This commit is contained in:
19
test/test.js
19
test/test.js
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user