1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-19 17:45:08 +00: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

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();