New Intention Action: Replace a call to forEach function with for loop.
Replaces an expression of form x.forEach { … } with for (a in x) { … }.
This commit is contained in:
committed by
Mikhael Bogdanov
parent
bd056d037f
commit
dbb28c571b
@@ -0,0 +1,5 @@
|
||||
fun foo() {
|
||||
for (a in x) {
|
||||
a.bar()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fun foo() {
|
||||
<spot>x.forEach { a -> a.bar() }</spot>
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
This intention converts a call to the "forEach" function into a for each loop expression.
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user