New Intention Action: Replace with operator assign
Replaces a statement of the form a = a + b with a statement of the form a += b.
This commit is contained in:
+4
@@ -0,0 +1,4 @@
|
||||
fun foo(x: Int) {
|
||||
var y = 1
|
||||
y += x
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
fun foo(x: Int) {
|
||||
var y = 1
|
||||
<spot>y = y + x</spot>
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
This intention converts an expression that modifies a variable's value and reassigns it to itself to an operation-assign expression.
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user