[IR] Consider TypeParameter as public declaration and serialize it properly
- Add test case when TypeParameter of generic property is exposed outside its module
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
// 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)
|
||||
}
|
||||
Reference in New Issue
Block a user