[IR] Check object init was called in case of name interpretation

#KT-58717 Fixed
This commit is contained in:
Ivan Kylchik
2023-05-16 14:34:38 +02:00
committed by Space Team
parent e5c45a4e51
commit e0e1d57120
5 changed files with 40 additions and 0 deletions
@@ -0,0 +1,16 @@
// !LANGUAGE: +IntrinsicConstEvaluation
// TARGET_BACKEND: JVM_IR
var result = "Fail"
object O {
fun foo() {}
init {
result = "OK"
}
}
fun box(): String {
O::foo.<!EVALUATED("foo")!>name<!>
return result
}