Minor: reformat DeepCopyIrTreeWithDescriptors.kt

This commit is contained in:
Dmitry Petrov
2019-04-12 12:12:15 +03:00
parent bf2ab99b61
commit 8a95da4a95
@@ -14,16 +14,17 @@ import org.jetbrains.kotlin.ir.symbols.*
import org.jetbrains.kotlin.ir.types.* import org.jetbrains.kotlin.ir.types.*
import org.jetbrains.kotlin.ir.types.impl.buildSimpleType import org.jetbrains.kotlin.ir.types.impl.buildSimpleType
import org.jetbrains.kotlin.ir.types.impl.makeTypeProjection import org.jetbrains.kotlin.ir.types.impl.makeTypeProjection
import org.jetbrains.kotlin.ir.types.impl.toBuilder
import org.jetbrains.kotlin.ir.util.* import org.jetbrains.kotlin.ir.util.*
import org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid import org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid
import org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid import org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid
import org.jetbrains.kotlin.ir.visitors.acceptVoid import org.jetbrains.kotlin.ir.visitors.acceptVoid
import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.name.Name
internal class DeepCopyIrTreeWithSymbolsForInliner(val context: Context, internal class DeepCopyIrTreeWithSymbolsForInliner(
val context: Context,
val typeArguments: Map<IrTypeParameterSymbol, IrType?>?, val typeArguments: Map<IrTypeParameterSymbol, IrType?>?,
val parent: IrDeclarationParent?) { val parent: IrDeclarationParent?
) {
fun copy(irElement: IrElement): IrElement { fun copy(irElement: IrElement): IrElement {
// Create new symbols. // Create new symbols.
@@ -53,7 +54,8 @@ internal class DeepCopyIrTreeWithSymbolsForInliner(val context: Context,
override fun visitEnumEntry(declaration: IrEnumEntry) { override fun visitEnumEntry(declaration: IrEnumEntry) {
(declaration.descriptor as WrappedClassDescriptor).bind( (declaration.descriptor as WrappedClassDescriptor).bind(
declaration.correspondingClass ?: declaration.parentAsClass) declaration.correspondingClass ?: declaration.parentAsClass
)
declaration.acceptChildrenVoid(this) declaration.acceptChildrenVoid(this)
} }
@@ -135,8 +137,10 @@ internal class DeepCopyIrTreeWithSymbolsForInliner(val context: Context,
WrappedValueParameterDescriptor(descriptor.annotations, descriptor.source) WrappedValueParameterDescriptor(descriptor.annotations, descriptor.source)
} }
private inner class InlinerTypeRemapper(val symbolRemapper: SymbolRemapper, private inner class InlinerTypeRemapper(
val typeArguments: Map<IrTypeParameterSymbol, IrType?>?) : TypeRemapper { val symbolRemapper: SymbolRemapper,
val typeArguments: Map<IrTypeParameterSymbol, IrType?>?
) : TypeRemapper {
override fun enterScope(irTypeParametersContainer: IrTypeParametersContainer) {} override fun enterScope(irTypeParametersContainer: IrTypeParametersContainer) {}