[Webkit-unassigned] [Bug 187134] New: Inconsistent output compared with other JS engines when using sort()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 27 21:26:50 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=187134

            Bug ID: 187134
           Summary: Inconsistent output compared with other JS engines
                    when using sort()
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: sunlili at ict.ac.cn

Hello,
The following code behaves strangely (inconsistent with other engines).

a=[3.3,2.2,1];
a.sort(function () { return -1;});

In Safari, output is
[1, 2.2, 3.3]
However, output should be:
[3.3, 2.2, 1]

BT group
2018.6.28

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180628/0ce02bd7/attachment.html>


More information about the webkit-unassigned mailing list