Introduce ReplaceToStringWithStringTemplateInspection #KT-13782 Fixed

This commit is contained in:
kenji tomita
2018-04-14 02:30:49 +03:00
committed by Mikhail Glukhikh
parent f956e8d85d
commit 817d75a47f
14 changed files with 155 additions and 0 deletions
@@ -0,0 +1 @@
org.jetbrains.kotlin.idea.inspections.ReplaceToStringWithStringTemplateInspection
@@ -0,0 +1,5 @@
// WITH_RUNTIME
// PROBLEM: none
fun test(): String {
return 1.<caret>toString()
}
@@ -0,0 +1,5 @@
// WITH_RUNTIME
fun test(): String {
val x = 1
return x.<caret>toString()
}
@@ -0,0 +1,5 @@
// WITH_RUNTIME
fun test(): String {
val x = 1
return "$x"
}
@@ -0,0 +1,6 @@
// WITH_RUNTIME
// PROBLEM: none
fun test(): String {
val x = 1
return "Foo: ${x.<caret>toString()}"
}