I’m facing an issue with Unsigned numbers in kotli...
# javascript
i
I’m facing an issue with Unsigned numbers in kotlin/js Kotlin common code:
Copy code
var x: ULong? = 1_000_000.toULong()
...
val s = "x: ${x}"
generated JS code for the toString of x
Copy code
function toString_1(o) {
    var tmp;
    if (o == null) {
      tmp = 'null';
    } else if (isArrayish(o)) {
      tmp = '[...]';
    } else if (!(typeof o.toString === 'function')) {
      tmp = anyToString(o);
    } else {
      // Inline function 'kotlin.js.unsafeCast' call
      tmp = o.toString();
    }
    return tmp;
  }
//---
  function ULong__toString_impl_f9au7k($this) {
    // Inline function 'kotlin.ulongToString' call
    var value = _ULong___get_data__impl__fggpzb($this);
    return ulongToString(value, 10);
  }
//---
function ulongToString(value, base) {
    if (value.compareTo_kvbqny_k$(new Long(0, 0)) >= 0)
      return toString_2(value, base);

---
And in runtime
Copy code
compareTo_kvbqny_k$ is undefined
kotlin v2.0.0, js IR Any ideas?
e
not seeing the issue, https://pl.kotl.in/EhOvw5Mo0
do you have a mcve? something else is going on because compareTo doesn't look like it's on this codepath
e
Can't reproduce even with 2.0.0
i