« Bugzilla Issues Index
#4514 — 22.1.3.24 Array.prototype.sort: NaN and consistent comparison
- bug_id:
4514
- creation_ts:
2015-08-21 14:14:00 -0700
- short_desc:
22.1.3.24 Array.prototype.sort: NaN and consistent comparison
- delta_ts:
2015-08-21 14:14:11 -0700
- product:
ECMA-262 Edition 6
- component:
technical issues
- version:
unspecified
- rep_platform:
All
- op_sys:
All
- bug_status:
CONFIRMED
- priority:
Normal
- bug_severity:
normal
- everconfirmed:
true
- reporter:
André Bargull
- assigned_to:
Allen Wirfs-Brock
- commentid:
14675
- comment_count:
0
- who:
André Bargull
- bug_when:
2015-08-21 14:14:11 -0700
22.1.3.24 Array.prototype.sort (comparefn)
Per the first bullet point in def. for "consistent comparison function", returning NaN makes the comparison function inconsistent. But NaN values are already special cased in SortCompare. Maybe def. for "consistent comparison function" should be changed to allow NaN values (and treat them like 0).