Redundant toString() in string template: highlight selector only

And not the receiver. So #KT-18253 Fixed
This commit is contained in:
Mikhail Glukhikh
2017-06-08 17:59:44 +03:00
parent 2afe8989df
commit 44e727b75c
6 changed files with 47 additions and 7 deletions
@@ -0,0 +1 @@
org.jetbrains.kotlin.idea.inspections.RemoveToStringInStringTemplateInspection
@@ -0,0 +1,7 @@
// PROBLEM: none
fun foo(a: Int, b: Int) = a + b
fun test(): String {
return "Foo: ${<caret>foo(0, 4).toString()}"
}
@@ -0,0 +1,5 @@
fun foo(a: Int, b: Int) = a + b
fun test(): String {
return "Foo: ${foo(0, 4).<caret>toString()}"
}
@@ -0,0 +1,5 @@
fun foo(a: Int, b: Int) = a + b
fun test(): String {
return "Foo: ${foo(0, 4)}"
}