fd67464d14
Use custom `evalToBoolean` as `eval` and `unsafeCast` are not available in Wasm stdlib
10 lines
316 B
Kotlin
Vendored
10 lines
316 B
Kotlin
Vendored
package testUtils
|
|
|
|
@JsName("eval")
|
|
private external fun evalToBoolean(code: String): Boolean
|
|
|
|
fun isLegacyBackend(): Boolean =
|
|
// Using eval to prevent DCE from thinking that following code depends on Kotlin module.
|
|
evalToBoolean("(typeof Kotlin != \"undefined\" && typeof Kotlin.kotlin != \"undefined\")")
|
|
|