[IR] Make IrTypeArgument a sealed interface

This commit is contained in:
Sergej Jaskiewicz
2023-01-19 19:35:41 +01:00
committed by Space Team
parent c65b689fa0
commit 1f76d39e66
25 changed files with 59 additions and 73 deletions
@@ -374,7 +374,6 @@ open class IrFileSerializer(
return when (argument) {
is IrStarProjection -> serializeIrStarProjection()
is IrTypeProjection -> serializeIrTypeProjection(argument)
else -> TODO("Unexpected type argument kind: $argument")
}
}
@@ -484,7 +483,6 @@ open class IrFileSerializer(
kind = when (this) {
is IrStarProjection -> IrTypeArgumentKind.STAR
is IrTypeProjection -> IrTypeArgumentKind.PROJECTION
else -> error("Unexpected type argument kind: $this")
},
variance = (this as? IrTypeProjection)?.variance,
type = (this as? IrTypeProjection)?.type?.toIrTypeKey