From 36d91aeec0ded56c6b0e8588a64fa5fd503c6422 Mon Sep 17 00:00:00 2001 From: Vladimir Dolzhenko Date: Mon, 8 Feb 2021 14:21:05 +0100 Subject: [PATCH] Check declaration modifier for actual method to avoid freeze Checking modifier aims to get rid of unnecessary resolve for methods in non MPP (the most) cases Relates to #KTIJ-1200 (cherry picked from commit 872effc21ef7855b9a21032806827516ed71514e) --- .../src/org/jetbrains/kotlin/idea/KotlinIconProvider.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/KotlinIconProvider.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/KotlinIconProvider.kt index ab72f0c2e7c62..2a0b20173dd21 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/KotlinIconProvider.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/KotlinIconProvider.kt @@ -7,7 +7,8 @@ package org.jetbrains.kotlin.idea import org.jetbrains.kotlin.idea.util.hasMatchingExpected import org.jetbrains.kotlin.psi.KtDeclaration +import org.jetbrains.kotlin.psi.psiUtil.hasActualModifier class KotlinIconProvider : KotlinIconProviderBase() { - override fun KtDeclaration.isMatchingExpected() = hasMatchingExpected() + override fun KtDeclaration.isMatchingExpected() = hasActualModifier() && hasMatchingExpected() } \ No newline at end of file