Status: Untriaged
Owner: ----

New issue 4385 by [email protected]: eval fails to produce anonymous generator
https://code.google.com/p/v8/issues/detail?id=4385

Version: All versions with generator support
OS: OSX
Architecture: x64

What steps will reproduce the problem?
1. eval("function* () {}")
2. SyntaxError: Unexpected token (
3. sadness

What is the expected output?
[Function]

What do you see instead?
undefined:1
function* () {}
          ^
SyntaxError: Unexpected token (
    at [eval]:1:1
    at Object.exports.runInThisContext (vm.js:54:17)
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:428:26)
    at evalScript (node.js:490:25)
    at startup (node.js:95:9)
    at node.js:882:3

I was trying to use eval to detect environment support for generators by using eval, so I don't get syntax errors. At first I was trying to eval an anonymous generator, but that just threw that error. Named generators seem to work fine though.

--
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.

Reply via email to