Skip to content

Commit 133155f

Browse files
committed
Minor. Temporary import forEach as forEachStdLib to avoid problem with introducing HidesMembers annotation
1 parent 56ddd49 commit 133155f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

idea/src/org/jetbrains/kotlin/idea/intentions/SimplifyForIntention.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ import org.jetbrains.kotlin.descriptors.CallableDescriptor
2525
import org.jetbrains.kotlin.descriptors.ClassDescriptor
2626
import org.jetbrains.kotlin.idea.caches.resolve.analyzeFullyAndGetResult
2727
import org.jetbrains.kotlin.idea.inspections.IntentionBasedInspection
28-
import org.jetbrains.kotlin.idea.refactoring.introduce.introduceVariable.chooseApplicableComponentFunctions
2928
import org.jetbrains.kotlin.platform.JvmBuiltIns
3029
import org.jetbrains.kotlin.psi.*
3130
import org.jetbrains.kotlin.resolve.BindingContext
3231
import org.jetbrains.kotlin.resolve.DescriptorUtils
3332
import org.jetbrains.kotlin.resolve.calls.callUtil.getResolvedCall
33+
import kotlin.collections.forEach as forEachStdLib
3434

3535
class SimplifyForInspection : IntentionBasedInspection<KtForExpression>(SimplifyForIntention())
3636

@@ -50,7 +50,7 @@ class SimplifyForIntention : SelfTargetingRangeIntention<KtForExpression>(
5050
val loopParameter = element.loopParameter ?: return
5151

5252
loopParameter.replace(KtPsiFactory(element).createDestructuringDeclarationInFor("(${propertiesToRemove.joinToString { it.name!! }})"))
53-
propertiesToRemove.forEach { p -> p.delete() }
53+
propertiesToRemove.forEachStdLib { p -> p.delete() }
5454

5555
if (removeSelectorInLoopRange && loopRange is KtDotQualifiedExpression) {
5656
loopRange.replace(loopRange.receiverExpression)

0 commit comments

Comments
 (0)