Use correct toString method in IrCompileTimeChecker for analysis

This commit is contained in:
Ivan Kylchik
2022-10-24 13:46:26 +02:00
committed by Space Team
parent 5b16b2c71e
commit 1fc2575052
4 changed files with 23 additions and 4 deletions
@@ -0,0 +1,13 @@
// This test is needed to check that IrCompileTimeChecker will not fail trying to find and analyze correct toString method
object Obj {
override fun toString(): String = "OK"
fun Int.toString(): String = "Not OK"
}
const val a = 1 // this is a dummy const to avoid check in IrInterpreterDumpHandler
fun box(): String {
return "" + "$Obj" // force a call
}