Add some tests on Java property references

This commit is contained in:
Alexander Udalov
2015-07-10 15:50:33 +03:00
parent c62f19ee82
commit 3b2be6212d
5 changed files with 53 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
public class J {
static String x;
}

View 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()
}