Minor, move tests on JvmField into subdirectory

This commit is contained in:
Alexander Udalov
2018-07-16 18:24:43 +02:00
parent 715abda908
commit 79c2aa4acf
8 changed files with 113 additions and 50 deletions
@@ -0,0 +1,21 @@
// !LANGUAGE: +JvmFieldInInterface
// TARGET_BACKEND: JVM
// WITH_REFLECT
import kotlin.reflect.full.declaredMemberProperties
annotation class Ann(val value: String)
public class Bar(public val value: String)
interface Foo {
companion object {
@JvmField @Ann("O")
val FOO = Bar("K")
}
}
fun box(): String {
val field = Foo.Companion::class.declaredMemberProperties.single()
return (field.annotations.single() as Ann).value + (field.get(Foo.Companion) as Bar).value
}