Files
kotlin-fork/compiler/testData/codegen/box/properties/kt1714.kt
T
Vladimir Sukharev 7930885131 [Test] Convert IGNORE: NATIVE directives in box tests from M to R
^KT-59057

Merge-request: KT-MR-10757
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-06-23 14:15:48 +00:00

27 lines
411 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// TARGET_BACKEND: JVM_IR
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()
}
}
fun box() : String {
AImpl().test
test(AImpl())
return "OK"
}