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:
Ivan Kylchik
2021-08-10 17:32:56 +03:00
committed by TeamCityServer
parent 492b8acf93
commit 2f2e608502
6 changed files with 40 additions and 10 deletions
@@ -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()
}