[IR] Remapped some forgotten types during IR copying
This commit is contained in:
@@ -680,7 +680,7 @@ open class DeepCopyIrTreeWithSymbols(
|
|||||||
throw AssertionError("Outer loop was not transformed: ${irLoop.render()}")
|
throw AssertionError("Outer loop was not transformed: ${irLoop.render()}")
|
||||||
|
|
||||||
override fun visitWhileLoop(loop: IrWhileLoop): IrWhileLoop =
|
override fun visitWhileLoop(loop: IrWhileLoop): IrWhileLoop =
|
||||||
IrWhileLoopImpl(loop.startOffset, loop.endOffset, loop.type, mapStatementOrigin(loop.origin)).also { newLoop ->
|
IrWhileLoopImpl(loop.startOffset, loop.endOffset, loop.type.remapType(), mapStatementOrigin(loop.origin)).also { newLoop ->
|
||||||
transformedLoops[loop] = newLoop
|
transformedLoops[loop] = newLoop
|
||||||
newLoop.label = loop.label
|
newLoop.label = loop.label
|
||||||
newLoop.condition = loop.condition.transform()
|
newLoop.condition = loop.condition.transform()
|
||||||
@@ -688,7 +688,7 @@ open class DeepCopyIrTreeWithSymbols(
|
|||||||
}.copyAttributes(loop)
|
}.copyAttributes(loop)
|
||||||
|
|
||||||
override fun visitDoWhileLoop(loop: IrDoWhileLoop): IrDoWhileLoop =
|
override fun visitDoWhileLoop(loop: IrDoWhileLoop): IrDoWhileLoop =
|
||||||
IrDoWhileLoopImpl(loop.startOffset, loop.endOffset, loop.type, mapStatementOrigin(loop.origin)).also { newLoop ->
|
IrDoWhileLoopImpl(loop.startOffset, loop.endOffset, loop.type.remapType(), mapStatementOrigin(loop.origin)).also { newLoop ->
|
||||||
transformedLoops[loop] = newLoop
|
transformedLoops[loop] = newLoop
|
||||||
newLoop.label = loop.label
|
newLoop.label = loop.label
|
||||||
newLoop.condition = loop.condition.transform()
|
newLoop.condition = loop.condition.transform()
|
||||||
@@ -698,21 +698,21 @@ open class DeepCopyIrTreeWithSymbols(
|
|||||||
override fun visitBreak(jump: IrBreak): IrBreak =
|
override fun visitBreak(jump: IrBreak): IrBreak =
|
||||||
IrBreakImpl(
|
IrBreakImpl(
|
||||||
jump.startOffset, jump.endOffset,
|
jump.startOffset, jump.endOffset,
|
||||||
jump.type,
|
jump.type.remapType(),
|
||||||
getTransformedLoop(jump.loop)
|
getTransformedLoop(jump.loop)
|
||||||
).apply { label = jump.label }.copyAttributes(jump)
|
).apply { label = jump.label }.copyAttributes(jump)
|
||||||
|
|
||||||
override fun visitContinue(jump: IrContinue): IrContinue =
|
override fun visitContinue(jump: IrContinue): IrContinue =
|
||||||
IrContinueImpl(
|
IrContinueImpl(
|
||||||
jump.startOffset, jump.endOffset,
|
jump.startOffset, jump.endOffset,
|
||||||
jump.type,
|
jump.type.remapType(),
|
||||||
getTransformedLoop(jump.loop)
|
getTransformedLoop(jump.loop)
|
||||||
).apply { label = jump.label }.copyAttributes(jump)
|
).apply { label = jump.label }.copyAttributes(jump)
|
||||||
|
|
||||||
override fun visitTry(aTry: IrTry): IrTry =
|
override fun visitTry(aTry: IrTry): IrTry =
|
||||||
IrTryImpl(
|
IrTryImpl(
|
||||||
aTry.startOffset, aTry.endOffset,
|
aTry.startOffset, aTry.endOffset,
|
||||||
aTry.type,
|
aTry.type.remapType(),
|
||||||
aTry.tryResult.transform(),
|
aTry.tryResult.transform(),
|
||||||
aTry.catches.map { it.transform() },
|
aTry.catches.map { it.transform() },
|
||||||
aTry.finallyExpression?.transform()
|
aTry.finallyExpression?.transform()
|
||||||
|
|||||||
Reference in New Issue
Block a user