diff --git a/idea/src/org/jetbrains/kotlin/idea/util/IterableTypesDetector.kt b/idea/src/org/jetbrains/kotlin/idea/util/IterableTypesDetector.kt index 31bb2be9f6f..454b13dd686 100644 --- a/idea/src/org/jetbrains/kotlin/idea/util/IterableTypesDetector.kt +++ b/idea/src/org/jetbrains/kotlin/idea/util/IterableTypesDetector.kt @@ -42,7 +42,7 @@ public class IterableTypesDetector( private val cache = HashMap() private val iteratorName = Name.identifier("iterator") - private val typesWithIteratorExtensions: Collection = scope.getFunctions(iteratorName) + private val typesWithExtensionIterator: Collection = scope.getFunctions(iteratorName) .map { it.getExtensionReceiverParameter() } .filterNotNull() .map { it.getType() } @@ -64,6 +64,6 @@ public class IterableTypesDetector( } private fun canBeIterable(type: JetType): Boolean { - return type.getMemberScope().getFunctions(iteratorName).isEmpty() || typesWithIteratorExtensions.any { type.isSubtypeOf(type) } + return type.getMemberScope().getFunctions(iteratorName).isEmpty() || typesWithExtensionIterator.any { type.isSubtypeOf(type) } } } \ No newline at end of file