diff --git a/compiler/fir/fir2ir/jvm-backend/src/org/jetbrains/kotlin/fir/backend/jvm/FirJvmMangleComputer.kt b/compiler/fir/fir2ir/jvm-backend/src/org/jetbrains/kotlin/fir/backend/jvm/FirJvmMangleComputer.kt index c188b745934..115dbdd3188 100644 --- a/compiler/fir/fir2ir/jvm-backend/src/org/jetbrains/kotlin/fir/backend/jvm/FirJvmMangleComputer.kt +++ b/compiler/fir/fir2ir/jvm-backend/src/org/jetbrains/kotlin/fir/backend/jvm/FirJvmMangleComputer.kt @@ -153,6 +153,15 @@ open class FirJvmMangleComputer( if (this in parent.typeParameters) { return parent } + if (parent is FirCallableDeclaration<*>) { + val overriddenSymbol = parent.symbol.overriddenSymbol + if (overriddenSymbol != null) { + val fir = overriddenSymbol.fir + if (fir is FirTypeParametersOwner && this in fir.typeParameters) { + return parent + } + } + } } throw IllegalStateException("Should not be here!") }