Skip to content

Commit

Permalink
Minor: make DeepCopySymbolsRemapper open
Browse files Browse the repository at this point in the history
  • Loading branch information
dnpetrov committed May 24, 2017
1 parent e7eb078 commit ec9427a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import org.jetbrains.kotlin.ir.symbols.impl.*
import org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid
import org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid

class DeepCopySymbolsRemapper(
open class DeepCopySymbolsRemapper(
val descriptorsRemapper: DescriptorsRemapper = DescriptorsRemapper.DEFAULT
) : IrElementVisitorVoid, SymbolRemapper {
private val classes = hashMapOf<IrClassSymbol, IrClassSymbol>()
Expand All @@ -42,7 +42,7 @@ class DeepCopySymbolsRemapper(
element.acceptChildrenVoid(this)
}

private inline fun <D : DeclarationDescriptor, B : IrSymbolOwner, reified S : IrBindableSymbol<D, B>>
protected inline fun <D : DeclarationDescriptor, B : IrSymbolOwner, reified S : IrBindableSymbol<D, B>>
remapSymbol(map: MutableMap<S, S>, owner: B, createNewSymbol: (S) -> S) {
val symbol = owner.symbol as S
map[symbol] = createNewSymbol(symbol)
Expand Down

0 comments on commit ec9427a

Please sign in to comment.