What usually cause this kind of error on wasmJs? S...
# webassembly
m
What usually cause this kind of error on wasmJs? Same code works on JVM and iOS
Copy code
WebAssembly.instantiateStreaming(): Compiling function #95814:"asia.zeals.mobile.pwa.ui.components.BTZTD$lambd..." failed: call[1] expected type (ref null 564), found if of type (ref null 6) @+11835139
CompileError: WebAssembly.instantiateStreaming(): Compiling function #95814:"asia.zeals.mobile.pwa.ui.components.BTZTD$lambd..." failed: call[1] expected type (ref null 564), found if of type (ref null 6) @+11835139
1
Found the problem. Basically wasmJs doesn’t like to assign value that is possible Double or Int, to a Number
Copy code
fun processNumber(number: Number)

val double: Double? = 0.0
processNumber(double ?: 0)
Above code will throw exception in wasmJs but not in JVM/Native
i
Hi, could you please to post an issue http://kotl.in/issue? Thank you.
m
KT-80415 WasmJs Number Elvis Operator Crash Posted it here @Igor Yakovlev
thank you color 1