[JS IR] Fix clash between generic extension overloads
Type parameter constraints are used for calculating JS signature hash. ^KT-51151 Fixed
This commit is contained in:
committed by
Space
parent
9f5cbea0fa
commit
0982872959
@@ -139,7 +139,13 @@ fun jsFunctionSignature(declaration: IrFunction, context: JsIrBackendContext): S
|
||||
// TODO should we skip type parameters and use upper bound of type parameter when print type of value parameters?
|
||||
declaration.typeParameters.ifNotEmpty {
|
||||
nameBuilder.append("_\$t")
|
||||
joinTo(nameBuilder, "") { "_${it.name.asString()}" }
|
||||
forEach { typeParam ->
|
||||
nameBuilder.append("_").append(typeParam.name.asString())
|
||||
typeParam.superTypes.ifNotEmpty {
|
||||
nameBuilder.append("$")
|
||||
joinTo(nameBuilder, "") { type -> type.asString() }
|
||||
}
|
||||
}
|
||||
}
|
||||
declaration.extensionReceiverParameter?.let {
|
||||
nameBuilder.append("_r$${it.type.asString()}")
|
||||
|
||||
Reference in New Issue
Block a user