mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
Add some tests on Java property references
This commit is contained in:
12
compiler/testData/codegen/boxWithJava/reflection/javaStaticField/K.kt
vendored
Normal file
12
compiler/testData/codegen/boxWithJava/reflection/javaStaticField/K.kt
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
fun box(): String {
|
||||
val f = J::x
|
||||
assertEquals("x", f.name)
|
||||
|
||||
f.set("OK")
|
||||
assertEquals("OK", J.x)
|
||||
assertEquals("OK", f.getter())
|
||||
|
||||
return f.get()
|
||||
}
|
||||
Reference in New Issue
Block a user