Files
kotlin-fork/compiler/testData/codegen/box/properties/kt4383.kt
T
2021-09-27 17:07:39 +03:00

21 lines
360 B
Kotlin
Vendored

// DONT_TARGET_EXACT_BACKEND: WASM
// WASM_MUTE_REASON: UNIT_ISSUES
import kotlin.reflect.KProperty
class D {
operator fun getValue(a: Any, p: KProperty<*>) { }
}
object P {
val u = Unit
val v by D()
var w = Unit
}
fun box(): String {
if (P.u != P.v) return "Fail uv"
P.w = Unit
if (P.w != P.u) return "Fail w"
return "OK"
}