Add possibility to interpret and fold IrStringConcatenation expression
This commit is contained in:
+16
@@ -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"<!>
|
||||
@@ -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 = <!NON_CONST_VAL_USED_IN_CONSTANT_EXPRESSION!>"A $nonConst B"<!>
|
||||
@@ -0,0 +1,24 @@
|
||||
package
|
||||
|
||||
public val nonConst: kotlin.Int = 0
|
||||
public const val printA: kotlin.String
|
||||
public const val printB: kotlin.String
|
||||
public const val simple: kotlin.String = "OK 3.0"
|
||||
public const val withInnerConcatenation: kotlin.String = "1 2 3 4 5 6"
|
||||
public const val withNonConst: kotlin.String = "A 0 B"
|
||||
public const val withNull: kotlin.String = "1 null"
|
||||
public const val withNullPlus: kotlin.String
|
||||
|
||||
public object A {
|
||||
private constructor A()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public object B {
|
||||
private constructor B()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ fun toString(): kotlin.String
|
||||
}
|
||||
Reference in New Issue
Block a user