Skip to content

Commit

Permalink
Check declaration modifier for actual method to avoid freeze
Browse files Browse the repository at this point in the history
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 872effc)
  • Loading branch information
vladimirdolzhenko committed Feb 12, 2021
1 parent 2d14378 commit 36d91ae
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

0 comments on commit 36d91ae

Please sign in to comment.