Files
kotlin-fork/compiler/testData/codegen/box/annotations/objectConstValInAnnotationArgument.kt
T
Ivan Kylchik 2f2e608502 Expand the possibilities of object's interpretation
It is possible to create object in interpreter even if its
receiver symbol came from function parameter instead of object's class.
#KT-48174 Fixed
2021-08-13 16:18:36 +03:00

15 lines
285 B
Kotlin
Vendored

// TARGET_BACKEND: JVM_IR
annotation class Key(val value: String)
object Messanger {
const val DEFAULT_TEXT = "OK"
fun message(@Key(value = DEFAULT_TEXT) text: String = DEFAULT_TEXT): String {
return text
}
}
fun box(): String {
return Messanger.message()
}