Intention to replace a = b with b.also { a = it }

^KT-22420 Fixed
This commit is contained in:
Dereck Bridie
2020-09-03 15:11:01 +02:00
committed by Vladimir Dolzhenko
parent e387d56d93
commit 94970e2d1e
15 changed files with 131 additions and 0 deletions
@@ -0,0 +1,4 @@
var x = 5
fun foo() {
<spot>10.also { x = it }</spot>
}
@@ -0,0 +1,4 @@
var x = 5
fun foo() {
<spot>x = 10</spot>
}
@@ -0,0 +1,5 @@
<html>
<body>
This intention converts a <b>variable assignment</b> to a variable assignment expression.
</body>
</html>
@@ -1749,6 +1749,7 @@ convert.to.0.as.1=Convert to ''{0} as {1}''
convert.to.0.unsafecast.1=Convert to ''{0}.unsafeCast<{1}>()''
convert.to.unsafecast.call=Convert to unsafeCast() call
convert.to.array.parameter=Convert to array parameter
convert.to.assignment.expression=Convert assignment to assignment expression
create.kotlin.subclass=Create Kotlin subclass
use.destructuring.declaration=Use destructuring declaration
implement.as.constructor.parameter=Implement as constructor parameter