[FIR] Don't initialize type of FirAnonymousObjectExpression
In some cases we check that some declaration (e.g. field) was analyzed by checking type of it's body/initializer (is it implicit or not), so if type of FirAnonymousObjectExpression is not implicit we can skip resolve of anonymous object itself
This commit is contained in:
-1
@@ -595,7 +595,6 @@ class DeclarationsConverter(
|
||||
|
||||
annotations += modifiers.annotations
|
||||
this.superTypeRefs += superTypeRefs
|
||||
this@buildAnonymousObjectExpression.typeRef = delegatedSelfType
|
||||
|
||||
val classWrapper = ClassWrapper(
|
||||
SpecialNames.NO_NAME_PROVIDED, modifiers, ClassKind.OBJECT, this,
|
||||
|
||||
@@ -982,7 +982,8 @@ open class RawFirBuilder(
|
||||
scopeProvider = baseScopeProvider
|
||||
symbol = FirAnonymousObjectSymbol()
|
||||
context.applyToActualCapturedTypeParameters(false) {
|
||||
typeParameters += buildOuterClassTypeParameterRef { symbol = it } }
|
||||
typeParameters += buildOuterClassTypeParameterRef { symbol = it }
|
||||
}
|
||||
val delegatedSelfType = objectDeclaration.toDelegatedSelfType(this)
|
||||
registerSelfType(delegatedSelfType)
|
||||
objectDeclaration.extractAnnotationsTo(this)
|
||||
@@ -993,7 +994,6 @@ open class RawFirBuilder(
|
||||
ClassKind.CLASS,
|
||||
containerTypeParameters = emptyList()
|
||||
)
|
||||
this@buildAnonymousObjectExpression.typeRef = delegatedSelfType
|
||||
|
||||
for (declaration in objectDeclaration.declarations) {
|
||||
declarations += declaration.toFirDeclaration(
|
||||
|
||||
Reference in New Issue
Block a user