From 87f6b14c0dae85ea239ab5f34c718d80f7b3a02c Mon Sep 17 00:00:00 2001 From: Brandon Fergerson Date: Fri, 16 Feb 2024 14:01:51 -0600 Subject: [PATCH] chore: kotlin objects are classes too --- .../jetbrains/marker/jvm/service/JVMArtifactScopeService.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/marker/jvm-marker/src/main/kotlin/spp/jetbrains/marker/jvm/service/JVMArtifactScopeService.kt b/marker/jvm-marker/src/main/kotlin/spp/jetbrains/marker/jvm/service/JVMArtifactScopeService.kt index f772d313a..69fb84651 100644 --- a/marker/jvm-marker/src/main/kotlin/spp/jetbrains/marker/jvm/service/JVMArtifactScopeService.kt +++ b/marker/jvm-marker/src/main/kotlin/spp/jetbrains/marker/jvm/service/JVMArtifactScopeService.kt @@ -36,7 +36,7 @@ import com.siyeh.ig.psiutils.ControlFlowUtils import org.jetbrains.kotlin.backend.jvm.ir.psiElement import org.jetbrains.kotlin.idea.caches.resolve.resolveToCall import org.jetbrains.kotlin.psi.* -import org.jetbrains.kotlin.psi.psiUtil.containingClass +import org.jetbrains.kotlin.psi.psiUtil.containingClassOrObject import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrCall import org.jetbrains.plugins.scala.lang.psi.api.statements.ScFunctionDefinition import org.joor.Reflect @@ -69,7 +69,7 @@ class JVMArtifactScopeService : IArtifactScopeService { return when { ArtifactTypeService.isKotlin(element) -> element.descendantsOfType().filter { if (element is KtClassOrObject && !includeInnerClasses) { - element == it.containingClass() + element == it.containingClassOrObject } else true }.toList()