Closed
Bug 772833
Opened 13 years ago
Closed 13 years ago
'in' operator in middle clause of a ternary not allowed
Categories
(Rhino Graveyard :: Core, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: anba, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0.1
Build ID: 20120614114901
Steps to reproduce:
Try to compile:
---
function(){ for (var x =a ? b in c :e in {}) {} }
---
Actual results:
REPL printed the following error:
js> function(){ for (var x =a ? b in c :e in {}) {} }
js: "<stdin>", line 7: missing : in conditional expression
js: function(){ for (var x =a ? b in c :e in {}) {} }
js: ................................^
js: "<stdin>", line 7: missing } after function body
js: function(){ for (var x =a ? b in c :e in {}) {} }
js: ................................................^
js: "<stdin>", line 7: Compilation produced 2 syntax errors.
Expected results:
No parser error should be reported, see spec grammar:
---
ConditionalExpressionNoIn :
LogicalORExpressionNoIn
LogicalORExpressionNoIn ? AssignmentExpression : AssignmentExpressionNoIn
---
Comment 1•13 years ago
|
||
Pretty esoteric! Fixed in git master:
https://github.com/mozilla/rhino/commit/bc034c15b4aeb8d381f8297dee35de7f5fa5d8ea
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•