Merge boxWithStdlib testData into box, delete BoxWithStdlib test
This commit is contained in:
committed by
Alexander Udalov
parent
22bfc9786a
commit
06a67e6602
+19
@@ -0,0 +1,19 @@
|
||||
// WITH_REFLECT
|
||||
|
||||
import kotlin.reflect.*
|
||||
import kotlin.reflect.jvm.*
|
||||
|
||||
class K<in T : String> {
|
||||
private var t: T
|
||||
get() = "OK" as T
|
||||
set(value) {}
|
||||
|
||||
fun run(): String {
|
||||
val p = K::class.memberProperties.single() as KMutableProperty1<K<String>, String>
|
||||
p.isAccessible = true
|
||||
p.set(this as K<String>, "")
|
||||
return p.get(this) as String
|
||||
}
|
||||
}
|
||||
|
||||
fun box() = K<String>().run()
|
||||
Reference in New Issue
Block a user