1c71e64f58
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.
19 lines
406 B
Kotlin
Vendored
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 |