diff --git a/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/DeclarationsConverter.kt b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/DeclarationsConverter.kt index 46f20ad6700..5dee3ec8c70 100644 --- a/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/DeclarationsConverter.kt +++ b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/DeclarationsConverter.kt @@ -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, diff --git a/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt b/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt index 6fee4de4bd1..0433f3d537b 100644 --- a/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt +++ b/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt @@ -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(