Files
kotlin-fork/compiler/testData/codegen/bytecodeText/stringOperations/kt42457_old.kt
T
Mikhail Glukhikh 1c71e64f58 [FIR] Create string interpolating call even for single argument
Before this commit, questionable optimization existed which
unwrapped string interpolating call with single argument to this argument.
However, this led to source element loss and the necessity of sub-hacks.
In this commit we dropped this optimization (anyway user can remove
this single-expression string template in code if needed) to keep
source elements intact.
2020-11-26 08:37:50 +03:00

19 lines
406 B
Kotlin
Vendored

// KOTLIN_CONFIGURATION_FLAGS: STRING_CONCAT=indy-with-constants
// JVM_TARGET: 9
// FILE: JavaClass.java
public class JavaClass {
public String toString() {
return null;
}
}
// FILE: Kotlin.kt
fun box() {
val toString: String? = JavaClass().toString()
val template: String = "${JavaClass()}"
}
// 0 INVOKEDYNAMIC makeConcat
// 1 JavaClass.toString
// 1 String.valueOf
// 0 append