mirror of
https://github.com/leporello-js/leporello-js
synced 2026-01-13 21:14:28 -08:00
fix
This commit is contained in:
@@ -814,6 +814,7 @@ const do_eval_frame_expr = (node, scope, callsleft) => {
|
|||||||
// TODO fix error messages
|
// TODO fix error messages
|
||||||
error: new Error('is not a function'),
|
error: new Error('is not a function'),
|
||||||
children,
|
children,
|
||||||
|
calls,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const c = calls[0]
|
const c = calls[0]
|
||||||
|
|||||||
@@ -693,6 +693,13 @@ export const tests = [
|
|||||||
assert_equal(frame.children[0].result.ok, false)
|
assert_equal(frame.children[0].result.ok, false)
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
test('eval_frame non-function call bug', () => {
|
||||||
|
const parsed = parse(`Object.assign({}, {}); null()`)
|
||||||
|
const tree = eval_tree(parsed.node)
|
||||||
|
const frame = eval_frame(tree)
|
||||||
|
assert_equal(frame.children[frame.children.length - 1].result.ok, false)
|
||||||
|
}),
|
||||||
|
|
||||||
test('eval_frame destructuring args', () => {
|
test('eval_frame destructuring args', () => {
|
||||||
const parsed = parse(`
|
const parsed = parse(`
|
||||||
const x = (...a) => a;
|
const x = (...a) => a;
|
||||||
|
|||||||
Reference in New Issue
Block a user