diff options
author | Andreas Kling <kling@serenityos.org> | 2020-04-02 09:53:27 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-04-02 09:56:13 +0200 |
commit | c683665ca959788e6ca308d9cebff285f47d4d84 (patch) | |
tree | 0acdc628b549b29b92a1fe720ab64658d530c48c | |
parent | b3d8ce44a2ed705b41c5d13f44fcd2ea6751eb3c (diff) | |
download | serenity-c683665ca959788e6ca308d9cebff285f47d4d84.zip |
LibJS: Fix bad cast in Interpreter::run()
We were casting to BlockStatement when we should cast to ScopeNode.
-rw-r--r-- | Libraries/LibJS/Interpreter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibJS/Interpreter.cpp b/Libraries/LibJS/Interpreter.cpp index 17236cf335..1c96f23b7f 100644 --- a/Libraries/LibJS/Interpreter.cpp +++ b/Libraries/LibJS/Interpreter.cpp @@ -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(); |