[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.
This commit is contained in:
Mikhail Glukhikh
2020-11-24 09:58:35 +03:00
parent 915a66f4fa
commit 1c71e64f58
9 changed files with 13 additions and 15 deletions
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// KOTLIN_CONFIGURATION_FLAGS: STRING_CONCAT=indy-with-constants
// JVM_TARGET: 9
// FILE: JavaClass.java
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun f(s: String) = "$s"
fun g(s: String?) = "$s"