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)

head
defect
Not set
normal

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