1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 10:01:13 +09:00

LibJS: Fix bad cast in Interpreter::run()

We were casting to BlockStatement when we should cast to ScopeNode.
This commit is contained in:
Andreas Kling 2020-04-02 09:53:27 +02:00
parent b3d8ce44a2
commit c683665ca9
Notes: sideshowbarker 2024-07-19 08:00:08 +09:00

View file

@ -59,7 +59,7 @@ Value Interpreter::run(const Statement& statement, Vector<Argument> arguments, S
if (!statement.is_scope_node())
return statement.execute(*this);
auto& block = static_cast<const BlockStatement&>(statement);
auto& block = static_cast<const ScopeNode&>(statement);
enter_scope(block, move(arguments), scope_type);
Value last_value = js_undefined();