Ticket #1390
Fantom code:
echo((0..<20).toList.sort)
or more sharp example
list := Int[,] 20.times { list.add(it) } echo(list.sort)
jvm output:
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
js output:
[0, 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 3, 4, 5, 6, 7, 8, 9]
Promoted to ticket #1390 and assigned to andy
Ticket resolved in 1.0.59
Yep, List was not delegating to Obj.compare for default sorts (not sure how that hasn't come up before). But pushed a fix for both sort and sortr.
Obj.compare
sort
sortr
Login or Signup to reply.
ilya Mon 17 Jan 2011
Fantom code:
or more sharp example
jvm output:
js output:
andy Mon 17 Jan 2011
Promoted to ticket #1390 and assigned to andy
andy Mon 18 Apr 2011
Ticket resolved in 1.0.59
Yep, List was not delegating to
Obj.compare
for default sorts (not sure how that hasn't come up before). But pushed a fix for bothsort
andsortr
.