Add possibility to interpret and fold IrStringConcatenation expression

This commit is contained in:
Ivan Kylchik
2023-02-09 12:29:27 +01:00
committed by Space Team
parent 7cf9dda8dc
commit 63b340651d
77 changed files with 305 additions and 184 deletions
@@ -0,0 +1,16 @@
const val simple = "O${'K'} ${1.toLong() + 2.0}"
const val withInnerConcatenation = "1 ${"2 ${3} ${4} 5"} 6"
object A
object B {
override fun toString(): String = "B"
}
const val printA = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>"A: $A"<!>
const val printB = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>"B: $B"<!>
const val withNull = "1 ${null}"
const val withNullPlus = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>"1" + null<!>
val nonConst = 0
const val withNonConst = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>"A $nonConst B"<!>