Created a deep copier good for fake overrides.
Adapted it from inliner copier. It is capable of producing type substituted members.
This commit is contained in:
-1
@@ -21,7 +21,6 @@ import org.jetbrains.kotlin.ir.visitors.acceptVoid
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
|
||||
internal class DeepCopyIrTreeWithSymbolsForInliner(
|
||||
val context: CommonBackendContext,
|
||||
val typeArguments: Map<IrTypeParameterSymbol, IrType?>?,
|
||||
val parent: IrDeclarationParent?
|
||||
) {
|
||||
|
||||
+1
-1
@@ -120,7 +120,7 @@ class FunctionInlining(
|
||||
(0 until callSite.typeArgumentsCount).map {
|
||||
typeParameters[it].symbol to callSite.getTypeArgument(it)
|
||||
}.associate { it }
|
||||
DeepCopyIrTreeWithSymbolsForInliner(context, typeArguments, parent)
|
||||
DeepCopyIrTreeWithSymbolsForInliner(typeArguments, parent)
|
||||
}
|
||||
|
||||
val substituteMap = mutableMapOf<IrValueParameter, IrExpression>()
|
||||
|
||||
Reference in New Issue
Block a user