[JS IR] stdlib: Use comparator in CharArray.sort

CharArray is represented as a regular JS Array. Its default sort order is based
on string representation of elements.
This commit is contained in:
Svyatoslav Kuzmich
2019-05-05 14:08:16 +03:00
parent 179acf0789
commit 362fbc8770
2 changed files with 8 additions and 2 deletions
@@ -1303,7 +1303,7 @@ public actual fun FloatArray.sort(): Unit {
* Sorts the array in-place.
*/
public actual fun CharArray.sort(): Unit {
this.asDynamic().sort()
this.asDynamic().sort(::primitiveCompareTo)
}
/**