Edoardo Luppi
02/08/2024, 5:57 PMChar
is mapped to a JS Number
> The number represents the character's code.
An expression like
if (Char.MAX_HIGH_SURROGATE < Char.MAX_LOW_SURROGATE) {
println("Yes")
}
Will generate
Companion_getInstance();
var tmp = _Char___init__impl__6a9atx(56319);
Companion_getInstance();
if (Char__compareTo_impl_ypi4mb(tmp, _Char___init__impl__6a9atx(57343)) < 0) {
println('Yes');
}
I wonder if the compiler can be improved to inline the two numbers.
This is relevant since when we use the characters directly
if ('\uDBFF' < '\uDC00') {
println("Yes")
}
We get the JS
println('Yes');
jw
02/09/2024, 12:14 AMEdoardo Luppi
02/09/2024, 10:14 AMEdoardo Luppi
02/09/2024, 10:15 AMturansky
02/09/2024, 3:22 PMI'd like to have set up by the Kotlin's tooling at some point, not by me.1. Do you have additional dependencies? a. Do you need bundle with dependencies inside? 2. Which module kind do you use?
Edoardo Luppi
02/09/2024, 4:29 PMEdoardo Luppi
02/09/2024, 4:30 PMbrowser
target, but IIRC there were other issues.