-
-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - Return the correct value from a statement list #2554
Conversation
Test262 conformance changes
Fixed tests (8):
|
Codecov Report
@@ Coverage Diff @@
## main #2554 +/- ##
==========================================
+ Coverage 49.99% 50.28% +0.29%
==========================================
Files 379 373 -6
Lines 37642 37423 -219
==========================================
Hits 18819 18819
+ Misses 18823 18604 -219
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
bors r+ |
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 request successfully merged into main. Build succeeded: |
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 setuse_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 theuse_expr
appropriately.