[Wasm] NFC refactor: eraseGenerics -> toWasmSignatureType
Use a more concrete name, make it private, and split out: IrSimpleType.toWasmSignatureSimpleType This does not change the behavior, but helps to set the stage for the following bugfix (KT-58852)
This commit is contained in:
committed by
Space Team
parent
5fcdd4a9f6
commit
b5def88ff4
@@ -13,13 +13,6 @@ import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol
|
||||
import org.jetbrains.kotlin.ir.types.*
|
||||
import org.jetbrains.kotlin.ir.util.defaultType
|
||||
|
||||
fun IrType.eraseGenerics(irBuiltIns: IrBuiltIns): IrType {
|
||||
if (this is IrDynamicType) return this
|
||||
if (this is IrErrorType) return this
|
||||
val defaultType = this.erasedUpperBound?.defaultType ?: irBuiltIns.anyType
|
||||
if (!this.isNullable()) return defaultType
|
||||
return defaultType.makeNullable()
|
||||
}
|
||||
|
||||
// Return null if upper bound is Any
|
||||
private val IrTypeParameter.erasedUpperBound: IrClass?
|
||||
|
||||
Reference in New Issue
Block a user