Simplify for intention refactoring: focus on the loop parameter, not on the loop itself

This commit is contained in:
Mikhail Glukhikh
2016-10-03 11:30:14 +03:00
parent 0a8006a395
commit 42aea59253
12 changed files with 83 additions and 87 deletions
@@ -0,0 +1,3 @@
val map = hashMapOf(1 to 2)
for (<spot>(key, value)</spot> in map) {
}
@@ -0,0 +1,5 @@
val map = hashMapOf(1 to 2)
for (<spot>entry</spot> in map.entries) {
val key = entry.key
val value = entry.value
}
@@ -0,0 +1,5 @@
<html>
<body>
This intention destructures declaration (of parameter or variable of data class / map entry type)
</body>
</html>