Files
kotlin-fork/compiler/testData/codegen/box/properties/genericPropertyMultiModule.kt
T
Roman Artemev 008cf03b06 [IR] Consider TypeParameter as public declaration and serialize it properly
- Add test case when TypeParameter of generic property is exposed outside its module
2019-06-14 18:40:59 +03:00

27 lines
412 B
Kotlin
Vendored

// WITH_RUNTIME
// MODULE: lib
// FILE: common.kt
class C<T>(var t: T)
var <T> C<T>.live: T
get() {
return t
}
set(value) {
t = value
}
// MODULE: main(lib)
// FILE: main.kt
import kotlin.reflect.KMutableProperty0
fun qux(text: KMutableProperty0<String>): String {
text.set("OK")
return text.get()
}
fun box(): String {
val c = C("FAIL")
return qux(c::live)
}