Closed
Bug 1100441
Opened 10 years ago
Closed 8 years ago
"yield expression needs to be parenthesized" should not occur for yield statements in a sequence
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1250589
People
(Reporter: kevinb7, Unassigned)
References
()
Details
(Keywords: reproducible, testcase)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.62 Safari/537.36
Steps to reproduce:
I tried running the following javascript code:
function* add(x,y) { return x + y; }
console.log(yield { gen: add(yield { gen: add(1, 2) }, yield { gen: add(3, 4) }) })
Actual results:
I get an error in the console that says: "yield expression must be parenthesized"
Expected results:
No error. Sequences are supposed to have higher precedence so the given expression should parse without error.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence#Table
Updated•10 years ago
|
Status: UNCONFIRMED → NEW
Component: Untriaged → JavaScript Engine
Ever confirmed: true
Keywords: reproducible,
testcase
OS: Mac OS X → All
Product: Firefox → Core
Hardware: x86 → All
Updated•9 years ago
|
Updated•8 years ago
|
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•