Bug 64875 - Use of `yield` keyword is broken
Summary: Use of `yield` keyword is broken
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Major
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-20 08:46 PDT by lekensteyn
Modified: 2011-07-21 22:30 PDT (History)
1 user (show)

See Also:


Attachments
Testcases which should all be OK, not FAIL (1.99 KB, text/html)
2011-07-20 08:46 PDT, lekensteyn
no flags Details
The patch (241.11 KB, patch)
2011-07-21 18:16 PDT, Gavin Barraclough
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description lekensteyn 2011-07-20 08:46:53 PDT
Created attachment 101475 [details]
Testcases which should all be OK, not FAIL

The use of `yield` as variable name is impossible, even when not in strict mode. This was confirmed in build 91186 (r91186.tar.bz2">http://builds.nightly.webkit.org/files/trunk/src/WebKit-r91186.tar.bz2)

Although the keyword cannot be used, it does neither work. The example from https://developer.mozilla.org/en/New_in_JavaScript_1.7#Generators gives a parse error:

    SyntaxError: Expected an identifier but found 'i' instead

The attached testcase provides some example code that demonstrates that yield cannot be used in some cases.
Comment 1 Gavin Barraclough 2011-07-20 11:04:45 PDT
Thanks for the bug report - yep, that's a nasty bug, will get on it asap.
Comment 2 Gavin Barraclough 2011-07-21 18:16:41 PDT
Created attachment 101682 [details]
The patch
Comment 3 Gavin Barraclough 2011-07-21 22:30:21 PDT
Fixed in r91553