FIR: relax simple type requirement in AbstractTypeMapper
The counterparts in old FE don't have such restriction, so it can map a type that has a flexible type as a type argument to JVM type, e.g., Stream<String..String?>
This commit is contained in:
committed by
TeamCityServer
parent
08e486d1a7
commit
4ec745abd7
+2
-2
@@ -133,8 +133,8 @@ class IrTypeMapper(private val context: JvmBackendContext) : KotlinTypeMapperBas
|
||||
sw: JvmSignatureWriter? = null
|
||||
): Type = AbstractTypeMapper.mapType(this, type, mode, sw)
|
||||
|
||||
override fun JvmSignatureWriter.writeGenericType(type: SimpleTypeMarker, asmType: Type, mode: TypeMappingMode) {
|
||||
require(type is IrSimpleType)
|
||||
override fun JvmSignatureWriter.writeGenericType(type: KotlinTypeMarker, asmType: Type, mode: TypeMappingMode) {
|
||||
if (type !is IrSimpleType) return
|
||||
if (skipGenericSignature() || hasNothingInNonContravariantPosition(type) || type.arguments.isEmpty() || type.isRawTypeImpl()) {
|
||||
writeAsmType(asmType)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user