Closed
Bug 384991
Opened 17 years ago
Closed 17 years ago
w(yield) should not cause "yield expression must be parenthesized" syntax error
Categories
(Core :: JavaScript Engine, defect, P3)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
mozilla1.9beta4
People
(Reporter: jruderman, Assigned: brendan)
References
Details
(Keywords: testcase)
Attachments
(1 file)
(deleted),
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
js> (function() { w(yield); })
typein:1: SyntaxError: yield expression must be parenthesized:
typein:1: (function() { w(yield); })
typein:1: ................^
js> (function() { w((yield)); })
function () {
w((yield));
}
js> (function() { w(1 ? yield : 0); })
function () {
w(yield);
}
Reporter | ||
Updated•17 years ago
|
Flags: blocking1.9?
Updated•17 years ago
|
Flags: blocking1.9-
Reporter | ||
Comment 2•17 years ago
|
||
js> (function () { f(x = yield); const x; })
function () {
f(yield);
const x;
}
Assignee | ||
Comment 3•17 years ago
|
||
ES4 is not requiring fully parenthesized yield if the yield expression is the only or last actual parameter. Patch shortly.
/be
Blocks: js1.8
Assignee | ||
Comment 4•17 years ago
|
||
Assignee | ||
Updated•17 years ago
|
Flags: wanted1.9+
OS: Mac OS X → All
Priority: -- → P3
Hardware: PC → All
Target Milestone: --- → mozilla1.9beta4
Updated•17 years ago
|
Attachment #304147 -
Flags: review?(mrbkap) → review+
Assignee | ||
Comment 5•17 years ago
|
||
I'm not in favor of runtime version checking, so these two tests will have to cope -- unless someone feels strongly that those errors should be thrown for version 1.7. A change in non-error semantics would be a different matter. Just relaxing things to permit what was an error before does not motivate me to spend code size and source complexity on version checks.
/be
Assignee | ||
Comment 6•17 years ago
|
||
Fixed:
js/src/jsparse.c 3.334
/be
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Comment 7•17 years ago
|
||
verified linux|mac|windows
/cvsroot/mozilla/js/tests/js1_8/genexps/regress-384991.js,v <-- regress-384991.js
initial revision: 1.1
Status: RESOLVED → VERIFIED
Flags: in-testsuite+
Flags: in-litmus-
Comment 8•9 years ago
|
||
Having this problem in Firefox 45.0.1. Have it been regressed?
Screenshot: http://s18.postimg.org/j8rlroi7t/firefox_yield.png
Comment 9•9 years ago
|
||
This is fixed in Firefox 47: bug 1250589.
Comment 10•9 years ago
|
||
Thanks for info! One strange thing here is that real error was 'Constructor ... is undefined' which I spotted by Chrome. Once that error was fixed -- yield was gone as well.
Comment 11•9 years ago
|
||
Please open a new bug when there is still a problem with Firefox 47 (currently Firefox Developer Edition). Thanks.
Comment 12•9 years ago
|
||
I didn't tried in 47. If I will have any problems there, then I will open new one. Thanks.
You need to log in
before you can comment on or make changes to this bug.
Description
•