[Wasm] Fix access to WebIDL dictionary members
Evaluate external interface companion objects as an empty JS object instead of null due to null checks on interop boundary. ^KT-59082 Fixed
This commit is contained in:
committed by
Space Team
parent
92de137cd6
commit
384c700a85
@@ -0,0 +1,15 @@
|
||||
// TARGET_BACKEND: WASM
|
||||
|
||||
@JsName("null")
|
||||
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
|
||||
public external interface CanvasFillRule : JsAny {
|
||||
companion object
|
||||
}
|
||||
|
||||
public inline val CanvasFillRule.Companion.EVENODD: CanvasFillRule get() =
|
||||
"evenodd".toJsString().unsafeCast<CanvasFillRule>()
|
||||
|
||||
fun box(): String {
|
||||
if (CanvasFillRule.EVENODD.toString() != "evenodd") return "Fail 1"
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user