Initial implementation of KT-7688 Intention action to iterate over iterable value
#KT-7688 Fixed
This commit is contained in:
@@ -0,0 +1 @@
|
||||
org.jetbrains.kotlin.idea.intentions.IterateExpressionIntention
|
||||
@@ -0,0 +1,7 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo() {
|
||||
f()<caret>
|
||||
}
|
||||
|
||||
fun f(): List<Int> = emptyList()
|
||||
@@ -0,0 +1,9 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo() {
|
||||
for (i in f()) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
|
||||
fun f(): List<Int> = emptyList()
|
||||
@@ -0,0 +1,3 @@
|
||||
fun foo(list: List<String>) {
|
||||
list<caret>
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
fun foo(list: List<String>) {
|
||||
for (s in list) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user