[FIR] Fix handling of type parameters in FIR mangling
#KT-57429 Fixed
This commit is contained in:
committed by
Space Team
parent
938dd65881
commit
67fc46a190
+4
-1
@@ -219,7 +219,7 @@ abstract class BaseKotlinMangleComputer<Declaration, Type, TypeParameter, ValueP
|
||||
|
||||
protected fun StringBuilder.mangleTypeParameterReference(typeParameter: TypeParameter) {
|
||||
val parent = getEffectiveParent(typeParameter)
|
||||
val containerIndex = typeParameterContainers.indexOf(parent)
|
||||
val containerIndex = getContainerIndex(parent)
|
||||
require(allowOutOfScopeTypeParameters || containerIndex >= 0) {
|
||||
"No container found for type parameter '${getTypeParameterName(typeParameter)}' of '${renderDeclaration(parent)}'"
|
||||
}
|
||||
@@ -228,6 +228,9 @@ abstract class BaseKotlinMangleComputer<Declaration, Type, TypeParameter, ValueP
|
||||
appendSignature(getIndexOfTypeParameter(typeParameter, parent))
|
||||
}
|
||||
|
||||
protected open fun getContainerIndex(parent: TypeParameterContainer): Int {
|
||||
return typeParameterContainers.indexOf(parent)
|
||||
}
|
||||
|
||||
protected fun mangleTypeParameter(
|
||||
tpBuilder: StringBuilder,
|
||||
|
||||
Reference in New Issue
Block a user