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:
Pradyoth Kukkapalli
2014-04-05 01:03:12 -04:00
parent 8777ab9ee8
commit 249af96d3c
23 changed files with 265 additions and 1 deletions
@@ -0,0 +1,4 @@
fun foo(x: Int) {
var y = 1
y += x
}
@@ -0,0 +1,4 @@
fun foo(x: Int) {
var y = 1
<spot>y = y + x</spot>
}
@@ -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>