KT-13113: Add inspection to detect single-expression string template
(cherry picked from squashed commits 49a3ef3 and 4c7a42a)
This commit is contained in:
committed by
Mikhail Glukhikh
parent
a9ee10a8b7
commit
9b8c55d823
+4
@@ -0,0 +1,4 @@
|
||||
fun foo(x: Int, y: String) {
|
||||
val z = y
|
||||
val w = x.toString()
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
fun foo(x: Int, y: String) {
|
||||
val z = "$y"
|
||||
val w = "$x"
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
This intention replaces single-expression string templates with expression itself, with toString() if necessary
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user