31 lines
596 B
Kotlin
Vendored
31 lines
596 B
Kotlin
Vendored
// DONT_TARGET_EXACT_BACKEND: WASM
|
|
// WASM_MUTE_REASON: IGNORED_IN_JS
|
|
// IGNORE_BACKEND: JS_IR
|
|
// IGNORE_BACKEND: JS_IR_ES6
|
|
// TODO: muted automatically, investigate should it be ran for JS or not
|
|
// IGNORE_BACKEND: JS, NATIVE
|
|
|
|
interface A {
|
|
val method : (() -> Unit )?
|
|
val test : Integer
|
|
}
|
|
|
|
class AImpl : A {
|
|
override val method : (() -> Unit )? = {
|
|
}
|
|
override val test : Integer = Integer(777)
|
|
}
|
|
|
|
fun test(a : A) {
|
|
val method = a.method
|
|
if (method != null) {
|
|
method()
|
|
}
|
|
}
|
|
|
|
public fun box() : String {
|
|
AImpl().test
|
|
test(AImpl())
|
|
return "OK"
|
|
}
|