From 133155f4cc98d79f03635d2c7d86392484ceb6a9 Mon Sep 17 00:00:00 2001 From: Stanislav Erokhin Date: Sat, 16 Jan 2016 11:30:38 +0300 Subject: [PATCH] Minor. Temporary import forEach as forEachStdLib to avoid problem with introducing HidesMembers annotation --- .../jetbrains/kotlin/idea/intentions/SimplifyForIntention.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/idea/src/org/jetbrains/kotlin/idea/intentions/SimplifyForIntention.kt b/idea/src/org/jetbrains/kotlin/idea/intentions/SimplifyForIntention.kt index fefb9811f61..442f544da96 100644 --- a/idea/src/org/jetbrains/kotlin/idea/intentions/SimplifyForIntention.kt +++ b/idea/src/org/jetbrains/kotlin/idea/intentions/SimplifyForIntention.kt @@ -25,12 +25,12 @@ import org.jetbrains.kotlin.descriptors.CallableDescriptor import org.jetbrains.kotlin.descriptors.ClassDescriptor import org.jetbrains.kotlin.idea.caches.resolve.analyzeFullyAndGetResult import org.jetbrains.kotlin.idea.inspections.IntentionBasedInspection -import org.jetbrains.kotlin.idea.refactoring.introduce.introduceVariable.chooseApplicableComponentFunctions import org.jetbrains.kotlin.platform.JvmBuiltIns import org.jetbrains.kotlin.psi.* import org.jetbrains.kotlin.resolve.BindingContext import org.jetbrains.kotlin.resolve.DescriptorUtils import org.jetbrains.kotlin.resolve.calls.callUtil.getResolvedCall +import kotlin.collections.forEach as forEachStdLib class SimplifyForInspection : IntentionBasedInspection(SimplifyForIntention()) @@ -50,7 +50,7 @@ class SimplifyForIntention : SelfTargetingRangeIntention( val loopParameter = element.loopParameter ?: return loopParameter.replace(KtPsiFactory(element).createDestructuringDeclarationInFor("(${propertiesToRemove.joinToString { it.name!! }})")) - propertiesToRemove.forEach { p -> p.delete() } + propertiesToRemove.forEachStdLib { p -> p.delete() } if (removeSelectorInLoopRange && loopRange is KtDotQualifiedExpression) { loopRange.replace(loopRange.receiverExpression)