Opened 12 years ago
Closed 11 years ago
#9676 closed defect (fixed)
Shrinksafe handles unary "+" operator incorrectly
Reported by: | ppedemon | Owned by: | Adam Peller |
---|---|---|---|
Priority: | high | Milestone: | 1.4 |
Component: | ShrinkSafe | Version: | 1.1.0 |
Keywords: | unary plus | Cc: | Richard Backhouse |
Blocked By: | Blocking: |
Description
Shrinksafe doesn't handle unary plus operator correctly. For example, the following snippet:
var dummy = 1 + +2; console.log(dummy);
Is turned into this (keeping original var names):
var dummy = 1++2; console.log(dummy);
That's not legal Javascript syntax, so when executing Shrinksafe's output, you'll get an "Invalid increment operand" syntax error.
You can argue that no one writes code like this (in fact, my extra "+" when I discovered the error was a typo), but unary plus is legal javascript after all.
NB: I'm reporting for Dojo 1.1.0, but it might be present in newer versions as well.
Change History (6)
comment:1 Changed 12 years ago by
Cc: | Richard Backhouse added; Adam Peller removed |
---|---|
Milestone: | → 1.4 |
Owner: | changed from alex to Adam Peller |
comment:2 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 Changed 11 years ago by
comment:5 Changed 11 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
good point... will keep this open to make sure we regenerate this for 1.4
comment:6 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Note: See
TracTickets for help on using
tickets.
Fixed in [20177]