Closed Bug 643764 Opened 13 years ago Closed 13 years ago

Operator precedence bug in TBPL

Categories

(Tree Management Graveyard :: TBPL, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jruderman, Assigned: mounir)

References

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

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
Attached patch Patch (obsolete) — Splinter Review
Assignee: bugzilla → mounir.lamouri
Status: NEW → ASSIGNED
Attachment #523000 - Flags: review?(arpad.borsos)
Whiteboard: [needs review]
Whiteboard: [needs review] → [needs proper patch]
Attached patch PatchSplinter Review
oups...
Attachment #523000 - Attachment is obsolete: true
Attachment #523000 - Flags: review?(arpad.borsos)
Attachment #523004 - Flags: review?(mstange)
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+
Pushed:
https://hg.mozilla.org/users/mstange_themasta.com/tinderboxpushlog/rev/18c9515c64c7
Status: ASSIGNED → RESOLVED
Closed: 13 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.

Attachment

General

Created:
Updated:
Size: