Initial implementation of KT-7688 Intention action to iterate over iterable value

#KT-7688 Fixed
This commit is contained in:
Valentin Kipyatkov
2015-06-26 14:12:43 +02:00
parent 4fc67c27b0
commit 2206459874
17 changed files with 173 additions and 25 deletions
@@ -392,9 +392,9 @@ class SmartCompletion(
}
val scope = bindingContext.get(BindingContext.RESOLUTION_SCOPE, expressionWithType)
val iterableDetector = IterableTypesDetector(project, moduleDescriptor, scope, loopVarType)
val iterableDetector = IterableTypesDetector(project, moduleDescriptor, scope)
return buildResultByTypeFilter(expressionWithType, receiver, Tail.RPARENTH) { iterableDetector.isIterable(it) }
return buildResultByTypeFilter(expressionWithType, receiver, Tail.RPARENTH) { iterableDetector.isIterable(it, loopVarType) }
}
private fun buildForInOperatorArgument(expressionWithType: JetExpression, receiver: JetExpression?): Result? {