Replace with string templates: add curly braces if needed

#KT-37173 Fixed
This commit is contained in:
Toshiaki Kameyama
2020-03-03 18:01:00 +09:00
committed by Yan Zhulanow
parent 8d3e41ae60
commit bf3e739edf
4 changed files with 28 additions and 3 deletions
@@ -0,0 +1,6 @@
// WITH_RUNTIME
fun main() {
val id = "abc"
val date = "123"
val s = String.format(<caret>"%s_%s_%s", id, date, id)
}
@@ -0,0 +1,6 @@
// WITH_RUNTIME
fun main() {
val id = "abc"
val date = "123"
val s = "${id}_${date}_$id"
}