Status: Assigned
Owner: [email protected]
CC: [email protected]
Labels: Type-Bug Priority-Medium Harmony
New issue 4399 by [email protected]: Switch desugaring broke return
value for eval
https://code.google.com/p/v8/issues/detail?id=4399
Switch is a statement, but in eval, it has an expression value! The
semantics are very well-defined in ES6
http://www.ecma-international.org/ecma-262/6.0/#sec-runtime-semantics-caseblockevaluation
and we implemented it correctly until recently. I broke that in
https://codereview.chromium.org/1293283002
Before the patch:
d8> eval("switch(1) { case 1: 'foo'; break; }")
"foo"
After the patch:
d8> eval("switch(1) { case 1: 'foo'; break; }")
undefined
There were apparently no tests (neither mjsunit nor test262) for this. I
wonder how many other eval expression values are untested. (Who uses this?!)
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.