[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
|
annotations += modifiers.annotations
|
||||||
this.superTypeRefs += superTypeRefs
|
this.superTypeRefs += superTypeRefs
|
||||||
this@buildAnonymousObjectExpression.typeRef = delegatedSelfType
|
|
||||||
|
|
||||||
val classWrapper = ClassWrapper(
|
val classWrapper = ClassWrapper(
|
||||||
SpecialNames.NO_NAME_PROVIDED, modifiers, ClassKind.OBJECT, this,
|
SpecialNames.NO_NAME_PROVIDED, modifiers, ClassKind.OBJECT, this,
|
||||||
|
|||||||
@@ -982,7 +982,8 @@ open class RawFirBuilder(
|
|||||||
scopeProvider = baseScopeProvider
|
scopeProvider = baseScopeProvider
|
||||||
symbol = FirAnonymousObjectSymbol()
|
symbol = FirAnonymousObjectSymbol()
|
||||||
context.applyToActualCapturedTypeParameters(false) {
|
context.applyToActualCapturedTypeParameters(false) {
|
||||||
typeParameters += buildOuterClassTypeParameterRef { symbol = it } }
|
typeParameters += buildOuterClassTypeParameterRef { symbol = it }
|
||||||
|
}
|
||||||
val delegatedSelfType = objectDeclaration.toDelegatedSelfType(this)
|
val delegatedSelfType = objectDeclaration.toDelegatedSelfType(this)
|
||||||
registerSelfType(delegatedSelfType)
|
registerSelfType(delegatedSelfType)
|
||||||
objectDeclaration.extractAnnotationsTo(this)
|
objectDeclaration.extractAnnotationsTo(this)
|
||||||
@@ -993,7 +994,6 @@ open class RawFirBuilder(
|
|||||||
ClassKind.CLASS,
|
ClassKind.CLASS,
|
||||||
containerTypeParameters = emptyList()
|
containerTypeParameters = emptyList()
|
||||||
)
|
)
|
||||||
this@buildAnonymousObjectExpression.typeRef = delegatedSelfType
|
|
||||||
|
|
||||||
for (declaration in objectDeclaration.declarations) {
|
for (declaration in objectDeclaration.declarations) {
|
||||||
declarations += declaration.toFirDeclaration(
|
declarations += declaration.toFirDeclaration(
|
||||||
|
|||||||
Reference in New Issue
Block a user