KAPT+IR: support IR error types
#KT-49682
This commit is contained in:
+1
-1
@@ -216,7 +216,7 @@ abstract class AnnotationCodegen(
|
||||
genCompileTimeValue(getAnnotationArgumentJvmName(annotationClass, param.name), value, annotationVisitor)
|
||||
else if (param.defaultValue != null)
|
||||
continue // Default value will be supplied by JVM at runtime.
|
||||
else
|
||||
else if (context.state.classBuilderMode.generateBodies) //skip error for KAPT
|
||||
error("No value for annotation parameter $param")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ val IrType.erasedUpperBound: IrClass
|
||||
is IrClassSymbol -> classifier.owner
|
||||
is IrTypeParameterSymbol -> classifier.owner.erasedUpperBound
|
||||
is IrScriptSymbol -> classifier.owner.targetClass!!.owner
|
||||
else -> error(render())
|
||||
else -> if (this is IrErrorType) symbol.owner else error(render())
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -132,6 +132,11 @@ class IrTypeMapper(private val context: JvmBackendContext) : KotlinTypeMapperBas
|
||||
): Type = AbstractTypeMapper.mapType(this, type, mode, sw)
|
||||
|
||||
override fun JvmSignatureWriter.writeGenericType(type: KotlinTypeMarker, asmType: Type, mode: TypeMappingMode) {
|
||||
if (type is IrErrorType) {
|
||||
writeAsmType(asmType)
|
||||
return
|
||||
}
|
||||
|
||||
if (type !is IrSimpleType) return
|
||||
if (skipGenericSignature() || hasNothingInNonContravariantPosition(type) || type.arguments.isEmpty() || type.isRawTypeImpl()) {
|
||||
writeAsmType(asmType)
|
||||
|
||||
Reference in New Issue
Block a user