Files
kotlin-fork/compiler/testData/codegen/bytecodeText/stringOperations/concatDynamicIndy.kt
T
2021-09-28 13:01:47 +03:00

24 lines
459 B
Kotlin
Vendored

// KOTLIN_CONFIGURATION_FLAGS: STRING_CONCAT=indy
// JVM_TARGET: 11
class A
inline fun test(s: (String) -> Unit) {
s("456")
}
fun box(a: String, b: String?) {
val s = a + "1" + "2" + 3 + 4L + b + 5.0 + 6F + '7' + A() + true + false + 3147483647u
a.plus(b)
b?.plus(a)
val ref1 = a::plus
val ref2 = b::plus
test("123"::plus)
}
// 0 INVOKEDYNAMIC makeConcatWithConstants
// 6 INVOKEDYNAMIC makeConcat
// 0 append
// 0 stringPlus