diff --git a/idea/src/org/jetbrains/kotlin/idea/inspections/LeakingThisInspection.kt b/idea/src/org/jetbrains/kotlin/idea/inspections/LeakingThisInspection.kt index 5070956ec72..09cf91c4ee6 100644 --- a/idea/src/org/jetbrains/kotlin/idea/inspections/LeakingThisInspection.kt +++ b/idea/src/org/jetbrains/kotlin/idea/inspections/LeakingThisInspection.kt @@ -32,6 +32,7 @@ class LeakingThisInspection : AbstractKotlinInspection() { val context = klass.analyzeWithContent() val leakingThese = context.getSliceContents(LEAKING_THIS) these@ for ((expression, leakingThisDescriptor) in leakingThese) { + if (leakingThisDescriptor.classOrObject != klass) continue@these val description = when (leakingThisDescriptor) { is NonFinalClass -> if (expression is KtThisExpression)