mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-12 09:57:00 +02:00
Previously, when a loop detected an unwind of type ScopeType::Function (which means a return statement was executed inside of the loop), it would just return undefined. This set the VM's last_value to undefined, when it should have been the returned value. This patch makes all loop statements return the appropriate value in the above case.
65 KiB
65 KiB