Files
kotlin/compiler/testData/codegen/boxWithJava/platformStatic/annotations/simpleClassObject.kt
Mikhail Glukhikh eab288bdd7 annotation() now has no arguments. Syntax migration to Retention / Repeatable / MustBeDocumented combination
Deprecated test for annotation(params) completion deleted. A lot of tests changed.
2015-09-04 19:21:12 +03:00

27 lines
440 B
Kotlin
Vendored

import kotlin.jvm.JvmStatic
@Retention(AnnotationRetention.RUNTIME)
annotation class testAnnotation
class A {
companion object {
val b: String = "OK"
JvmStatic testAnnotation fun test1() = b
}
}
object B {
val b: String = "OK"
JvmStatic testAnnotation fun test1() = b
}
fun box(): String {
if (Test.test1() != "OK") return "fail 1"
if (Test.test2() != "OK") return "fail 2"
return "OK"
}