CLOSED FIXED Bug 14897
Decompilation of double negation fails and produces invalid or incorrect code
https://bugs.webkit.org/show_bug.cgi?id=14897
Summary Decompilation of double negation fails and produces invalid or incorrect code
Oliver Hunt
Reported 2007-08-07 20:28:24 PDT
> (function() { a - -b; } ) becomes function() {a--b;} and - -b becomes --b Which is also clearly wrong and bad, but *will* compile
Attachments
Oliver Hunt
Comment 1 2007-08-07 20:32:40 PDT
> (function(){a + +b;}).toString() function(){a++b;} Which is also wrong.
Jesse Ruderman
Comment 2 2007-08-07 20:38:49 PDT
FWIW, Mozilla had the same bug and fixed it by always decompiling negation as "- ". See https://bugzilla.mozilla.org/show_bug.cgi?id=346904 for details.
Sam Weinig
Comment 3 2007-08-07 22:46:34 PDT
Sam Weinig
Comment 4 2007-08-07 22:47:42 PDT
Fix landed in r24924
Oliver Hunt
Comment 5 2007-08-07 23:35:07 PDT
*** Bug 14892 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.