1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 18:28:10 +00:00

LibJS: Fix not executing the expression of a return statement

This commit is contained in:
Matthew Olsson 2021-06-08 16:29:21 -07:00 committed by Andreas Kling
parent a1e5711a27
commit f286cf1792

View file

@ -401,6 +401,8 @@ void CallExpression::generate_bytecode(Bytecode::Generator& generator) const
void ReturnStatement::generate_bytecode(Bytecode::Generator& generator) const
{
if (m_argument)
m_argument->generate_bytecode(generator);
generator.emit<Bytecode::Op::Return>();
}