FIR2IR: do not convert @ExtensionFunctionType twice
This commit is contained in:
committed by
TeamCityServer
parent
4608431682
commit
fe0c25693d
@@ -23,13 +23,6 @@ class Fir2IrBuiltIns(
|
||||
provider?.initComponents(components)
|
||||
}
|
||||
|
||||
private val extensionFunctionTypeAnnotationSymbol by lazy {
|
||||
annotationSymbolById(CompilerConeAttributes.ExtensionFunctionType.ANNOTATION_CLASS_ID)
|
||||
}
|
||||
|
||||
internal fun extensionFunctionTypeAnnotationConstructorCall(): IrConstructorCall =
|
||||
extensionFunctionTypeAnnotationSymbol!!.toConstructorCall()
|
||||
|
||||
private val enhancedNullabilityAnnotationSymbol by lazy {
|
||||
annotationSymbolById(CompilerConeAttributes.EnhancedNullability.ANNOTATION_CLASS_ID)
|
||||
}
|
||||
|
||||
@@ -88,9 +88,7 @@ class Fir2IrTypeConverter(
|
||||
val firSymbol = this.lookupTag.toSymbol(session) ?: return createErrorType()
|
||||
firSymbol.toSymbol(session, classifierStorage, typeContext)
|
||||
}
|
||||
val typeAnnotations: MutableList<IrConstructorCall> =
|
||||
if (!isExtensionFunctionType) mutableListOf()
|
||||
else mutableListOf(builtIns.extensionFunctionTypeAnnotationConstructorCall())
|
||||
val typeAnnotations: MutableList<IrConstructorCall> = mutableListOf()
|
||||
typeAnnotations += with(annotationGenerator) { annotations.toIrAnnotations() }
|
||||
if (hasEnhancedNullability) {
|
||||
builtIns.enhancedNullabilityAnnotationConstructorCall()?.let {
|
||||
|
||||
Reference in New Issue
Block a user