5b16b2c71e
If string concatenation contains object value, then this argument will not have explicit toString call. We must find and check toString method manually. #KT-54615
19 lines
613 B
Kotlin
Vendored
19 lines
613 B
Kotlin
Vendored
// FIR_IDENTICAL
|
|
|
|
object O : Code(0)
|
|
|
|
open class Code(val x: Int) {
|
|
override fun toString() = "$x"
|
|
}
|
|
|
|
class A {
|
|
companion object: Code(0)
|
|
}
|
|
|
|
const val toString1 = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>O.toString()<!>
|
|
const val toString2 = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>A.toString()<!>
|
|
const val plusString1 = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>"string" + O<!>
|
|
const val plusString2 = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>"string" + A<!>
|
|
const val stringConcat1 = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>"$O"<!>
|
|
const val stringConcat2 = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>"$A"<!>
|