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
  • Loading branch information
vladimirdolzhenko authored and Space committed Feb 8, 2021
1 parent 3e17317 commit 872effc
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 872effc

Please sign in to comment.