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.
24 lines
525 B
Kotlin
Vendored
24 lines
525 B
Kotlin
Vendored
// !LANGUAGE: +InlineClasses
|
|
|
|
// FILE: Z.kt
|
|
inline class Z(val value: Int)
|
|
|
|
// FILE: test.kt
|
|
fun test1_1(z: Z) = "$z"
|
|
fun test1_2(z: Z) = "$z$z"
|
|
fun test1_many(z: Z) = "$z $z $z"
|
|
fun test1_concat1(z: Z) = "-" + z
|
|
fun test1_concat2(z: Z) = "$z" + z
|
|
fun test1_concat3(z: Z) = "-" + z + z
|
|
|
|
fun test2_1(z: Z?) = "$z"
|
|
fun test2_2(z: Z?) = "$z$z"
|
|
fun test2_many(z: Z?) = "$z $z $z"
|
|
fun test2_concat1(z: Z?) = "-" + z
|
|
fun test2_concat2(z: Z?) = "$z" + z
|
|
fun test2_concat3(z: Z?) = "-" + z + z
|
|
|
|
// @TestKt.class:
|
|
// 0 box
|
|
// 0 unbox
|