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
This commit is contained in:
committed by
TeamCityServer
parent
492b8acf93
commit
2f2e608502
+14
@@ -0,0 +1,14 @@
|
||||
// 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()
|
||||
}
|
||||
Reference in New Issue
Block a user