Operator precedence bug in TBPL

RESOLVED FIXED

Status

Tree Management Graveyard
TBPL
RESOLVED FIXED
7 years ago
3 years ago

People

(Reporter: Jesse Ruderman, Assigned: mounir)

Tracking

({regression})

Trunk
regression

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

7 years ago
Current:
http://hg.mozilla.org/users/mstange_themasta.com/tinderboxpushlog/file/5144a12549dc/js/Data.js#l399

Bug introduced in changeset:
http://hg.mozilla.org/users/mstange_themasta.com/tinderboxpushlog/rev/cf0cd90904e4

This is a bug because unary "!" binds more tightly than binary "in":
(!"h" in {})              false
(!"h" in {'h':3})         false
(!"h" in {'false':3})     true

With parens, it does what you probably want:
(!("h" in {}))            true
(!("h" in {'h': 3}))      false
(Assignee)

Comment 1

7 years ago
Created attachment 523000 [details] [diff] [review]
Patch
Assignee: bugzilla → mounir.lamouri
Status: NEW → ASSIGNED
Attachment #523000 - Flags: review?(arpad.borsos)
(Assignee)

Updated

7 years ago
Whiteboard: [needs review]
Whiteboard: [needs review] → [needs proper patch]
(Assignee)

Comment 2

7 years ago
Created attachment 523004 [details] [diff] [review]
Patch

oups...
Attachment #523000 - Attachment is obsolete: true
Attachment #523000 - Flags: review?(arpad.borsos)
Attachment #523004 - Flags: review?(mstange)
(Assignee)

Updated

7 years ago
Whiteboard: [needs proper patch] → [needs review]
Comment on attachment 523004 [details] [diff] [review]
Patch

Easy fix. :-)
Comment on attachment 523004 [details] [diff] [review]
Patch

;)
Attachment #523004 - Flags: review?(mstange) → review+
(Assignee)

Comment 5

7 years ago
Pushed:
https://hg.mozilla.org/users/mstange_themasta.com/tinderboxpushlog/rev/18c9515c64c7
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Whiteboard: [needs review]
Product: Webtools → Tree Management
Product: Tree Management → Tree Management Graveyard
You need to log in before you can comment on or make changes to this bug.