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>