Closed TelephoneTan closed 5 months ago
Changing Int
to Long
should solve this problem. But this is supposed to work too, I probably forgot to add auto casting for typed parameters.
Will fix this.
It will violate the interface in Kotlin code which declares this method should return Int if I simply change Int to Long. 😂
Hi, maybe we can map js number type to any suitable kotlin number type.
For example, if js number is smaller than Int.MAX_VALUE
, the kotlin code can use Byte
, Short
, Long
, if the kotlin code use Short
type, only throw convertion exception when js value is bigger than Short.MAX_VALUE
.
Good idea, might add this as part of the built-in type conversions.
@dokar3 Could you please change the README to state the latest type conversion behavior? ;-)
Updated!
Kotlin:
JS:
I pass the
asyncFunction
defined toversion
function in JS, then this exception is thrown