[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:
Roman Artemev
2019-06-05 14:00:43 +03:00
committed by romanart
parent efaf5a9947
commit 008cf03b06
12 changed files with 129 additions and 43 deletions
@@ -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)
}