mirror of https://github.com/boa-dev/boa.git
Browse Source
When compiling a statement list we need to make sure that the last expression that returns a value is compiled with the `use_expr` flag. Currently we set `use_expr` on the last statement of the statement list. This leads to incorrect returns when the last statement does not return a value. This PR fixes this by looking up the last value returning expression in a statement list and setting the `use_expr` appropriately.pull/2559/head
raskad
2 years ago
1 changed files with 38 additions and 20 deletions
Loading…
Reference in new issue