[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:
Svyatoslav Kuzmich
2023-12-12 13:35:59 +01:00
committed by Space Team
parent 5fcdd4a9f6
commit b5def88ff4
3 changed files with 18 additions and 18 deletions
@@ -31,7 +31,7 @@ private fun IrType.withNullability(newNullability: Boolean): IrType =
else -> this
}
private fun IrSimpleType.withNullability(newNullability: Boolean): IrSimpleType {
fun IrSimpleType.withNullability(newNullability: Boolean): IrSimpleType {
val requiredNullability = if (newNullability) SimpleTypeNullability.MARKED_NULLABLE else SimpleTypeNullability.DEFINITELY_NOT_NULL
return if (nullability == requiredNullability)
this