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
@@ -1,19 +0,0 @@
package test
annotation class Ann(
val s1: String,
val s2: String,
val s3: String,
val s4: String
)
val i = 1
@Ann(
s1 = "a$i",
s2 = "a$i b",
s3 = <!NON_CONST_VAL_USED_IN_CONSTANT_EXPRESSION!>"$i"<!>,
s4 = "a${i}a$i"
) class MyClass
// EXPECTED: @Ann(s1 = "a1", s2 = "a1 b", s3 = "1", s4 = "a1a1")
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
package test
annotation class Ann(
@@ -1,9 +0,0 @@
package test
annotation class Ann(val s1: String, val s2: String)
val i = 1
@Ann(s1 = "a" + "b", s2 = "a" + "a$i") class MyClass
// EXPECTED: @Ann(s1 = "ab", s2 = "aa1")
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
package test
annotation class Ann(val s1: String, val s2: String)