[IR] Make IrReturnTargetSymbol a sealed interface

This commit is contained in:
Sergej Jaskiewicz
2023-05-05 13:49:50 +02:00
committed by Space Team
parent 6c211f3a39
commit 93d1932ccb
7 changed files with 13 additions and 15 deletions
@@ -75,7 +75,6 @@ internal abstract class AbstractValueUsageTransformer(
is IrSimpleFunctionSymbol -> this.useAs(returnTarget.owner.returnType)
is IrConstructorSymbol -> this.useAs(irBuiltIns.unitType)
is IrReturnableBlockSymbol -> this.useAs(returnTarget.owner.type)
else -> error(returnTarget)
}
protected open fun IrExpression.useAsResult(enclosing: IrExpression): IrExpression =
@@ -79,7 +79,6 @@ private class AutoboxingTransformer(val context: Context) : AbstractValueUsageTr
is IrSimpleFunctionSymbol -> this.useAs(returnTarget.owner.returnType)
is IrConstructorSymbol -> this.useAs(irBuiltIns.unitType)
is IrReturnableBlockSymbol -> this.useAs(returnTarget.owner.type)
else -> error(returnTarget)
}
override fun IrExpression.useAs(type: IrType): IrExpression {