[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
@@ -66,7 +66,6 @@ class TransitiveExportCollector(val context: JsIrBackendContext) {
is IrType -> substitute(typeSubstitutionMap)
is IrTypeProjection -> type.substitute(typeSubstitutionMap)
is IrStarProjection -> context.irBuiltIns.anyNType
else -> error("Unexpected ir type argument")
}
}
@@ -39,7 +39,6 @@ fun IrType.asString(): String = when (this) {
private fun IrTypeArgument.asString(): String = when (this) {
is IrStarProjection -> "*"
is IrTypeProjection -> variance.label + (if (variance != Variance.INVARIANT) " " else "") + type.asString()
else -> error("Unexpected kind of IrTypeArgument: " + javaClass.simpleName)
}
private fun IrClassifierSymbol.asString() = when (this) {