From c683665ca959788e6ca308d9cebff285f47d4d84 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 2 Apr 2020 09:53:27 +0200 Subject: [PATCH] LibJS: Fix bad cast in Interpreter::run() We were casting to BlockStatement when we should cast to ScopeNode. --- Libraries/LibJS/Interpreter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 arguments, S if (!statement.is_scope_node()) return statement.execute(*this); - auto& block = static_cast(statement); + auto& block = static_cast(statement); enter_scope(block, move(arguments), scope_type); Value last_value = js_undefined();