diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirProjectionRelationChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirProjectionRelationChecker.kt index a929af915f9..223c011eb65 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirProjectionRelationChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirProjectionRelationChecker.kt @@ -24,10 +24,6 @@ object FirProjectionRelationChecker : FirBasicDeclarationChecker() { } if (declaration is FirTypedDeclaration) { - // The body of function contract is not fully resolved. - if (declaration.resolvePhase == FirResolvePhase.CONTRACTS) { - return - } checkTypeRef(declaration.returnTypeRef, context, reporter) } diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/Arguments.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/Arguments.kt index db2f05b1806..4462128c7a6 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/Arguments.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/Arguments.kt @@ -16,7 +16,6 @@ import org.jetbrains.kotlin.fir.resolve.ScopeSession import org.jetbrains.kotlin.fir.resolve.createFunctionalType import org.jetbrains.kotlin.fir.resolve.fullyExpandedType import org.jetbrains.kotlin.fir.resolve.inference.* -import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.firUnsafe import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.resultType import org.jetbrains.kotlin.fir.resolve.transformers.ensureResolvedTypeDeclaration import org.jetbrains.kotlin.fir.returnExpressions @@ -430,7 +429,6 @@ internal fun Candidate.resolveArgument( context: ResolutionContext ) { argument.resultType.ensureResolvedTypeDeclaration(context.session) - val expectedType = prepareExpectedType(context.session, context.bodyResolveComponents.scopeSession, callInfo, argument, parameter, context) resolveArgumentExpression( diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/CreateFreshTypeVariableSubstitutorStage.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/CreateFreshTypeVariableSubstitutorStage.kt index 0573339bfd3..6dee29c18e8 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/CreateFreshTypeVariableSubstitutorStage.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/CreateFreshTypeVariableSubstitutorStage.kt @@ -6,6 +6,7 @@ package org.jetbrains.kotlin.fir.resolve.calls import org.jetbrains.kotlin.fir.FirSession +import org.jetbrains.kotlin.fir.declarations.FirResolvePhase import org.jetbrains.kotlin.fir.declarations.FirTypeParameterRef import org.jetbrains.kotlin.fir.declarations.FirTypeParameterRefsOwner import org.jetbrains.kotlin.fir.renderWithType @@ -17,6 +18,7 @@ import org.jetbrains.kotlin.fir.resolve.inference.model.ConeExplicitTypeParamete import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutor import org.jetbrains.kotlin.fir.resolve.substitution.substitutorByMap import org.jetbrains.kotlin.fir.symbols.ConeTypeParameterLookupTag +import org.jetbrains.kotlin.fir.symbols.ensureResolved import org.jetbrains.kotlin.fir.typeContext import org.jetbrains.kotlin.fir.types.* import org.jetbrains.kotlin.fir.types.impl.FirTypePlaceholderProjection @@ -27,6 +29,7 @@ import org.jetbrains.kotlin.resolve.calls.inference.model.SimpleConstraintSystem internal object CreateFreshTypeVariableSubstitutorStage : ResolutionStage() { override suspend fun check(candidate: Candidate, callInfo: CallInfo, sink: CheckerSink, context: ResolutionContext) { val declaration = candidate.symbol.fir + candidate.symbol.ensureResolved(FirResolvePhase.STATUS) if (declaration !is FirTypeParameterRefsOwner || declaration.typeParameters.isEmpty()) { candidate.substitutor = ConeSubstitutor.Empty candidate.freshVariables = emptyList() diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/ResolutionStages.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/ResolutionStages.kt index a2408192f5f..c7b180f6a16 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/ResolutionStages.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/ResolutionStages.kt @@ -18,6 +18,7 @@ import org.jetbrains.kotlin.fir.resolve.inference.* import org.jetbrains.kotlin.fir.resolve.toSymbol import org.jetbrains.kotlin.fir.scopes.FirUnstableSmartcastTypeScope import org.jetbrains.kotlin.fir.symbols.SyntheticSymbol +import org.jetbrains.kotlin.fir.symbols.ensureResolved import org.jetbrains.kotlin.fir.symbols.impl.FirCallableSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirFunctionSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirNamedFunctionSymbol @@ -153,6 +154,7 @@ internal object MapArguments : ResolutionStage() { internal object CheckArguments : CheckerStage() { override suspend fun check(candidate: Candidate, callInfo: CallInfo, sink: CheckerSink, context: ResolutionContext) { + candidate.symbol.ensureResolved(FirResolvePhase.STATUS) val argumentMapping = candidate.argumentMapping ?: error("Argument should be already mapped while checking arguments!") for (argument in callInfo.arguments) { diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirAbstractPhaseTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirAbstractPhaseTransformer.kt index 7a6d26487d5..ac35d6f9f45 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirAbstractPhaseTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirAbstractPhaseTransformer.kt @@ -27,21 +27,9 @@ abstract class FirAbstractPhaseTransformer( override fun transformFile(file: FirFile, data: D): FirFile { checkSessionConsistency(file) - if (file.resolvePhase < transformerPhase) { - file.replaceResolvePhase(transformerPhase) - } - return super.transformFile(file, data) } - override fun transformDeclaration(declaration: FirDeclaration, data: D): FirDeclaration { - if (declaration.resolvePhase < transformerPhase) { - declaration.replaceResolvePhase(transformerPhase) - } - - return super.transformDeclaration(declaration, data) - } - protected fun checkSessionConsistency(file: FirFile) { assert(session === file.moduleData.session) { "File ${file.name} and transformer ${this::class} have inconsistent sessions" diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirAbstractTreeTransformerWithSuperTypes.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirAbstractTreeTransformerWithSuperTypes.kt index 0232c06e1eb..999742e2cd9 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirAbstractTreeTransformerWithSuperTypes.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirAbstractTreeTransformerWithSuperTypes.kt @@ -33,8 +33,6 @@ abstract class FirAbstractTreeTransformerWithSuperTypes( protected val classDeclarationsStack = ArrayDeque() protected val towerScope = FirCompositeScope(scopes.asReversed()) - protected open fun needReplacePhase(firDeclaration: FirDeclaration): Boolean = transformerPhase > firDeclaration.resolvePhase - protected inline fun withScopeCleanup(crossinline l: () -> T): T { val sizeBefore = scopes.size val result = l() @@ -56,9 +54,6 @@ abstract class FirAbstractTreeTransformerWithSuperTypes( firClass: FirClass, data: Any? ): FirStatement { - if (needReplacePhase(firClass)) { - firClass.replaceResolvePhase(transformerPhase) - } return withScopeCleanup { // Otherwise annotations may try to resolve // themselves as inner classes of the `firClass` diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirImportResolveTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirImportResolveTransformer.kt index 27f2aa1b234..b8ca4d4a4c7 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirImportResolveTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirImportResolveTransformer.kt @@ -42,7 +42,6 @@ open class FirImportResolveTransformer protected constructor( override fun transformFile(file: FirFile, data: Any?): FirFile { checkSessionConsistency(file) - file.replaceResolvePhase(transformerPhase) return file.also { val prevValue = currentFile currentFile = file diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirPhaseCheckingPhaseManager.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirPhaseCheckingPhaseManager.kt index 4d9fe1059d9..ec970765121 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirPhaseCheckingPhaseManager.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirPhaseCheckingPhaseManager.kt @@ -5,20 +5,10 @@ package org.jetbrains.kotlin.fir.resolve.transformers -import org.jetbrains.kotlin.fir.FirRenderer import org.jetbrains.kotlin.fir.declarations.FirResolvePhase -import org.jetbrains.kotlin.fir.render import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol import org.jetbrains.kotlin.fir.symbols.FirPhaseManager object FirPhaseCheckingPhaseManager : FirPhaseManager() { - override fun ensureResolved(symbol: FirBasedSymbol<*>, requiredPhase: FirResolvePhase) { - val fir = symbol.fir - val availablePhase = fir.resolvePhase - require(availablePhase >= requiredPhase) { - "Expected at least $requiredPhase for $symbol but was $availablePhase\n{${fir.render(renderMode)}" - } - } - - private val renderMode = FirRenderer.RenderMode.WithResolvePhases.copy(renderDeclarationOrigin = true) + override fun ensureResolved(symbol: FirBasedSymbol<*>, requiredPhase: FirResolvePhase) = Unit } diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirStatusResolveTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirStatusResolveTransformer.kt index da3ab9e994b..d9d7176beab 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirStatusResolveTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirStatusResolveTransformer.kt @@ -169,7 +169,6 @@ open class FirDesignatedStatusResolveTransformer( val computationStatus = statusComputationSession.startComputing(regularClass) forceResolveStatusesOfSupertypes(regularClass) if (computationStatus != StatusComputationSession.StatusComputationStatus.Computed) { - updateResolvePhaseOfMembers(regularClass) regularClass.transformStatus(this, statusResolver.resolveStatus(regularClass, containingClass, isLocal = false)) } } else { @@ -257,12 +256,7 @@ abstract class AbstractFirStatusResolveTransformer( protected abstract fun FirDeclaration.needResolveMembers(): Boolean protected abstract fun FirDeclaration.needResolveNestedClassifiers(): Boolean - protected open fun needReplacePhase(firDeclaration: FirDeclaration): Boolean = transformerPhase > firDeclaration.resolvePhase - override fun transformFile(file: FirFile, data: FirResolvedDeclarationStatus?): FirFile { - if (needReplacePhase(file)) { - file.replaceResolvePhase(transformerPhase) - } transformDeclarationContent(file, data) return file } @@ -288,9 +282,6 @@ abstract class AbstractFirStatusResolveTransformer( declaration: FirDeclaration, data: FirResolvedDeclarationStatus? ): FirDeclaration { - if (needReplacePhase(declaration)) { - declaration.replaceResolvePhase(transformerPhase) - } return when (declaration) { is FirCallableDeclaration -> { if (declaration is FirFunction) { @@ -342,18 +333,17 @@ abstract class AbstractFirStatusResolveTransformer( } if (declaration.needResolveMembers()) { - val members = declarations.filter { it !is FirClassLikeDeclaration } - members.forEach { member -> - if (needReplacePhase(member)) { - member.replaceResolvePhase(transformerPhase) + declarations.forEach { + if (it !is FirClassLikeDeclaration) { + it.transformSingle(this, data) } } - members.forEach { member -> member.transformSingle(this, data) } } if (declaration.needResolveNestedClassifiers()) { - val members = declarations.filterIsInstance() - for (klass in members) { - klass.transformSingle(this, data) + declarations.forEach { + if (it is FirClassLikeDeclaration) { + it.transformSingle(this, data) + } } } return declaration @@ -366,23 +356,10 @@ abstract class AbstractFirStatusResolveTransformer( ): FirStatement { return storeClass(klass) { klass.typeParameters.forEach { it.transformSingle(this, data) } - if (needReplacePhase(klass)) { - klass.replaceResolvePhase(transformerPhase) - } transformDeclarationContent(klass, data) } as FirStatement } - protected fun updateResolvePhaseOfMembers(regularClass: FirRegularClass) { - for (declaration in regularClass.declarations) { - if (declaration is FirProperty || declaration is FirSimpleFunction) { - if (needReplacePhase(declaration)) { - declaration.replaceResolvePhase(transformerPhase) - } - } - } - } - protected fun forceResolveStatusesOfSupertypes(regularClass: FirRegularClass) { for (superTypeRef in regularClass.superTypeRefs) { forceResolveStatusOfCorrespondingClass(superTypeRef) @@ -460,10 +437,6 @@ abstract class AbstractFirStatusResolveTransformer( statusResolver.resolveStatus(propertyAccessor, containingClass, containingProperty, isLocal = false) ) - if (needReplacePhase(propertyAccessor)) { - propertyAccessor.replaceResolvePhase(transformerPhase) - } - propertyAccessor.transformValueParameters(this, null) } @@ -480,9 +453,6 @@ abstract class AbstractFirStatusResolveTransformer( simpleFunction: FirSimpleFunction, data: FirResolvedDeclarationStatus? ): FirStatement { - if (needReplacePhase(simpleFunction)) { - simpleFunction.replaceResolvePhase(transformerPhase) - } val resolvedStatus = statusResolver.resolveStatus(simpleFunction, containingClass, isLocal = false) simpleFunction.transformStatus(this, resolvedStatus) calculateDeprecations(simpleFunction) @@ -493,9 +463,6 @@ abstract class AbstractFirStatusResolveTransformer( property: FirProperty, data: FirResolvedDeclarationStatus? ): FirStatement { - if (needReplacePhase(property)) { - property.replaceResolvePhase(transformerPhase) - } property.transformStatus(this, statusResolver.resolveStatus(property, containingClass, isLocal = false)) property.getter?.let { transformPropertyAccessor(it, property) } diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirSupertypesResolution.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirSupertypesResolution.kt index 1cc46c8c50c..916635b55f3 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirSupertypesResolution.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirSupertypesResolution.kt @@ -105,17 +105,11 @@ open class FirApplySupertypesTransformer( return element } - protected open fun needReplacePhase(firDeclaration: FirDeclaration): Boolean = FirResolvePhase.SUPER_TYPES > firDeclaration.resolvePhase - protected open fun transformDeclarationContent(declaration: FirDeclaration, data: Any?): FirDeclaration { return declaration.transformChildren(this, null) as FirDeclaration } override fun transformFile(file: FirFile, data: Any?): FirFile { - if (needReplacePhase(file)) { - file.replaceResolvePhase(FirResolvePhase.SUPER_TYPES) - } - return transformDeclarationContent(file, null) as FirFile } @@ -132,9 +126,6 @@ open class FirApplySupertypesTransformer( // TODO: Replace with an immutable version or transformer firClass.replaceSuperTypeRefs(supertypeRefs) } - if (needReplacePhase(firClass)) { - firClass.replaceResolvePhase(FirResolvePhase.SUPER_TYPES) - } } override fun transformAnonymousObject(anonymousObject: FirAnonymousObject, data: Any?): FirStatement { @@ -153,9 +144,6 @@ open class FirApplySupertypesTransformer( override fun transformTypeAlias(typeAlias: FirTypeAlias, data: Any?): FirStatement { if (typeAlias.expandedTypeRef is FirResolvedTypeRef) { - if (needReplacePhase(typeAlias)) { - typeAlias.replaceResolvePhase(FirResolvePhase.SUPER_TYPES) - } return typeAlias } val supertypeRefs = getResolvedSupertypeRefs(typeAlias) @@ -166,9 +154,6 @@ open class FirApplySupertypesTransformer( // TODO: Replace with an immutable version or transformer typeAlias.replaceExpandedTypeRef(supertypeRefs[0]) - if (needReplacePhase(typeAlias)) { - typeAlias.replaceResolvePhase(FirResolvePhase.SUPER_TYPES) - } return typeAlias } } diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirTypeResolveTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirTypeResolveTransformer.kt index 13a8c393aaf..d89ae9427cf 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirTypeResolveTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirTypeResolveTransformer.kt @@ -96,9 +96,6 @@ open class FirTypeResolveTransformer( } override fun transformEnumEntry(enumEntry: FirEnumEntry, data: Any?): FirEnumEntry { - if (needReplacePhase(enumEntry)) { - enumEntry.replaceResolvePhase(FirResolvePhase.TYPES) - } enumEntry.transformReturnTypeRef(this, data) enumEntry.transformTypeParameters(this, data) enumEntry.transformAnnotations(this, data) @@ -108,14 +105,6 @@ open class FirTypeResolveTransformer( override fun transformProperty(property: FirProperty, data: Any?): FirProperty { return withScopeCleanup { property.addTypeParametersScope() - if (needReplacePhase(property)) { - property.replaceResolvePhase(FirResolvePhase.TYPES) - property.getter?.replaceResolvePhase(FirResolvePhase.TYPES) - property.setter?.replaceResolvePhase(FirResolvePhase.TYPES) - property.setter?.valueParameters?.forEach { - it.replaceResolvePhase(FirResolvePhase.TYPES) - } - } property.transformTypeParameters(this, data) .transformReturnTypeRef(this, data) .transformReceiverTypeRef(this, data) @@ -136,9 +125,6 @@ open class FirTypeResolveTransformer( override fun transformField(field: FirField, data: Any?): FirField { return withScopeCleanup { - if (needReplacePhase(field)) { - field.replaceResolvePhase(FirResolvePhase.TYPES) - } field.transformReturnTypeRef(this, data).transformAnnotations(this, data) field } diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirAbstractBodyResolveTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirAbstractBodyResolveTransformer.kt index c686ceb4ccc..c7f831a4707 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirAbstractBodyResolveTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirAbstractBodyResolveTransformer.kt @@ -43,14 +43,6 @@ abstract class FirAbstractBodyResolveTransformer(phase: FirResolvePhase) : FirAb final override val session: FirSession get() = components.session - protected open fun needReplacePhase(firDeclaration: FirDeclaration): Boolean = transformerPhase > firDeclaration.resolvePhase - - fun replaceDeclarationResolvePhaseIfNeeded(firDeclaration: FirDeclaration, newResolvePhase: FirResolvePhase) { - if (needReplacePhase(firDeclaration) && newResolvePhase > firDeclaration.resolvePhase) { - firDeclaration.replaceResolvePhase(newResolvePhase) - } - } - @OptIn(PrivateForInline::class) internal inline fun withFullBodyResolve(crossinline l: () -> T): T { val shouldSwitchMode = implicitTypeOnly diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirBodyResolveTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirBodyResolveTransformer.kt index da0163f1d82..76ac7ca1817 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirBodyResolveTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirBodyResolveTransformer.kt @@ -50,7 +50,6 @@ open class FirBodyResolveTransformer( return context.withFile(file, components) { firTowerDataContextCollector?.addFileContext(file, context.towerDataContext) - file.replaceResolvePhase(transformerPhase) @Suppress("UNCHECKED_CAST") transformDeclarationContent(file, data) as FirFile } diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirDeclarationsResolveTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirDeclarationsResolveTransformer.kt index c2cec2fc6bc..69b44478e8a 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirDeclarationsResolveTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirDeclarationsResolveTransformer.kt @@ -71,7 +71,6 @@ open class FirDeclarationsResolveTransformer(transformer: FirBodyResolveTransfor private fun transformDeclarationContent(declaration: FirDeclaration, data: ResolutionMode): FirDeclaration { transformer.firTowerDataContextCollector?.addDeclarationContext(declaration, context.towerDataContext) - transformer.replaceDeclarationResolvePhaseIfNeeded(declaration, transformerPhase) return transformer.transformDeclarationContent(declaration, data) } @@ -89,7 +88,6 @@ open class FirDeclarationsResolveTransformer(transformer: FirBodyResolveTransfor callableMember.valueParameters.forEach { it.transformReturnTypeRef(transformer, ResolutionMode.ContextIndependent) it.transformVarargTypeToArrayType() - it.replaceResolvePhase(FirResolvePhase.STATUS) } } } @@ -102,14 +100,12 @@ open class FirDeclarationsResolveTransformer(transformer: FirBodyResolveTransfor private fun doTransformTypeParameters(declaration: FirMemberDeclaration) { for (typeParameter in declaration.typeParameters) { - (typeParameter as? FirTypeParameter)?.let { transformer.replaceDeclarationResolvePhaseIfNeeded(it, FirResolvePhase.STATUS) } typeParameter.transformChildren(transformer, ResolutionMode.ContextIndependent) } } override fun transformEnumEntry(enumEntry: FirEnumEntry, data: ResolutionMode): FirEnumEntry { if (implicitTypeOnly || enumEntry.initializerResolved) return enumEntry - transformer.replaceDeclarationResolvePhaseIfNeeded(enumEntry, transformerPhase) return context.forEnumEntry { (enumEntry.transformChildren(this, data) as FirEnumEntry) } @@ -152,7 +148,6 @@ open class FirDeclarationsResolveTransformer(transformer: FirBodyResolveTransfor property.transformAccessors() } } - transformer.replaceDeclarationResolvePhaseIfNeeded(property, transformerPhase) dataFlowAnalyzer.exitProperty(property)?.let { property.replaceControlFlowGraphReference(FirControlFlowGraphReferenceImpl(it)) } @@ -174,7 +169,6 @@ open class FirDeclarationsResolveTransformer(transformer: FirBodyResolveTransfor if (field.initializer != null) { storeVariableReturnType(field) } - transformer.replaceDeclarationResolvePhaseIfNeeded(field, transformerPhase) dataFlowAnalyzer.exitField(field) field } @@ -283,7 +277,6 @@ open class FirDeclarationsResolveTransformer(transformer: FirBodyResolveTransfor } variable.transformOtherChildren(transformer, ResolutionMode.ContextIndependent) context.storeVariable(variable) - transformer.replaceDeclarationResolvePhaseIfNeeded(variable, transformerPhase) dataFlowAnalyzer.exitLocalVariableDeclaration(variable) return variable } @@ -386,7 +379,6 @@ open class FirDeclarationsResolveTransformer(transformer: FirBodyResolveTransfor typeAlias.transformAnnotations(transformer, data) transformer.firTowerDataContextCollector?.addDeclarationContext(typeAlias, context.towerDataContext) typeAlias.transformExpandedTypeRef(transformer, data) - transformer.replaceDeclarationResolvePhaseIfNeeded(typeAlias, transformerPhase) return typeAlias } @@ -564,7 +556,6 @@ open class FirDeclarationsResolveTransformer(transformer: FirBodyResolveTransfor private fun doTransformConstructor(constructor: FirConstructor, data: ResolutionMode): FirConstructor { val owningClass = context.containerIfAny as? FirRegularClass - transformer.replaceDeclarationResolvePhaseIfNeeded(constructor, transformerPhase) dataFlowAnalyzer.enterFunction(constructor) constructor.transformTypeParameters(transformer, data) @@ -604,7 +595,6 @@ open class FirDeclarationsResolveTransformer(transformer: FirBodyResolveTransfor override fun transformValueParameter(valueParameter: FirValueParameter, data: ResolutionMode): FirStatement { if (valueParameter.returnTypeRef is FirImplicitTypeRef) { - transformer.replaceDeclarationResolvePhaseIfNeeded(valueParameter, transformerPhase) valueParameter.replaceReturnTypeRef( valueParameter.returnTypeRef.errorTypeFromPrototype( ConeSimpleDiagnostic("No type for parameter", DiagnosticKind.ValueParameterWithNoTypeAnnotation) diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/LocalClassesResolution.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/LocalClassesResolution.kt index 7d976bfc690..6434f7708fc 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/LocalClassesResolution.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/LocalClassesResolution.kt @@ -5,9 +5,7 @@ package org.jetbrains.kotlin.fir.resolve.transformers.body.resolve -import org.jetbrains.kotlin.fir.declarations.FirClassLikeDeclaration -import org.jetbrains.kotlin.fir.declarations.FirRegularClass -import org.jetbrains.kotlin.fir.declarations.FirResolvePhase +import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.resolve.ResolutionMode import org.jetbrains.kotlin.fir.resolve.transformers.FirProviderInterceptor import org.jetbrains.kotlin.fir.resolve.transformers.runStatusResolveForLocalClass @@ -22,7 +20,7 @@ fun F.runAllPhasesForLocalClass( firTowerDataContextCollector: FirTowerDataContextCollector?, firProviderInterceptor: FirProviderInterceptor?, ): F { - if (this.resolvePhase > FirResolvePhase.RAW_FIR) return this + if (this is FirMemberDeclaration && status is FirResolvedDeclarationStatus) return this if (this is FirRegularClass) { components.context.storeClassIfNotNested(this) } diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/contracts/FirContractResolveTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/contracts/FirContractResolveTransformer.kt index f6c703c830e..1927dd32821 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/contracts/FirContractResolveTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/contracts/FirContractResolveTransformer.kt @@ -54,7 +54,6 @@ open class FirContractResolveTransformer( simpleFunction: FirSimpleFunction, data: ResolutionMode ): FirSimpleFunction { - simpleFunction.updatePhase() if (!simpleFunction.hasContractToResolve) { return simpleFunction } @@ -76,17 +75,14 @@ open class FirContractResolveTransformer( } override fun transformProperty(property: FirProperty, data: ResolutionMode): FirProperty { - property.updatePhase() if ( property.getter?.hasContractToResolve != true && property.setter?.hasContractToResolve != true || property.isLocal || property.delegate != null ) { - property.updatePhaseForAccessors() return property } if (property is FirSyntheticProperty) { transformSimpleFunction(property.getter.delegate, data) - property.updatePhaseForAccessors() return property } context.withProperty(property) { @@ -96,13 +92,7 @@ open class FirContractResolveTransformer( return property } - private fun FirProperty.updatePhaseForAccessors() { - getter?.updatePhase() - setter?.updatePhase() - } - override fun transformField(field: FirField, data: ResolutionMode): FirField { - field.updatePhase() return field } @@ -110,7 +100,6 @@ open class FirContractResolveTransformer( propertyAccessor: FirPropertyAccessor, owner: FirProperty ): FirStatement { - propertyAccessor.updatePhase() if (!propertyAccessor.hasContractToResolve) { return propertyAccessor } @@ -229,7 +218,6 @@ open class FirContractResolveTransformer( } override fun transformRegularClass(regularClass: FirRegularClass, data: ResolutionMode): FirStatement { - regularClass.updatePhase() regularClass.transformCompanionObject(this, data) context.withRegularClass(regularClass, components, forContracts = true) { transformDeclarationContent(regularClass, data) @@ -241,7 +229,6 @@ open class FirContractResolveTransformer( anonymousObject: FirAnonymousObject, data: ResolutionMode ): FirStatement { - anonymousObject.updatePhase() context.withAnonymousObject(anonymousObject, components) { transformDeclarationContent(anonymousObject, data) } @@ -252,17 +239,14 @@ open class FirContractResolveTransformer( anonymousInitializer: FirAnonymousInitializer, data: ResolutionMode ): FirAnonymousInitializer { - anonymousInitializer.updatePhase() return anonymousInitializer } override fun transformConstructor(constructor: FirConstructor, data: ResolutionMode): FirConstructor { - constructor.updatePhase() return constructor } override fun transformEnumEntry(enumEntry: FirEnumEntry, data: ResolutionMode): FirEnumEntry { - enumEntry.updatePhase() return enumEntry } @@ -274,10 +258,6 @@ open class FirContractResolveTransformer( private val FirContractDescriptionOwner.hasContractToResolve: Boolean get() = contractDescription is FirLegacyRawContractDescription || contractDescription is FirRawContractDescription - - private fun FirDeclaration.updatePhase() { - transformer.replaceDeclarationResolvePhaseIfNeeded(this, FirResolvePhase.CONTRACTS) - } } } diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/plugin/FirPluginAnnotationsResolveTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/plugin/FirPluginAnnotationsResolveTransformer.kt index 7b39215f54b..1ba4610cb6f 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/plugin/FirPluginAnnotationsResolveTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/plugin/FirPluginAnnotationsResolveTransformer.kt @@ -44,7 +44,6 @@ class FirPluginAnnotationsResolveTransformer( checkSessionConsistency(file) if (!extensionService.hasPredicateBasedExtensions) return file val registeredPluginAnnotations = session.registeredPluginAnnotations - file.replaceResolvePhase(FirResolvePhase.ANNOTATIONS_FOR_PLUGINS) val newAnnotations = file.resolveAnnotations(registeredPluginAnnotations.annotations, registeredPluginAnnotations.metaAnnotations) if (!newAnnotations.isEmpty) { for (metaAnnotation in newAnnotations.keySet()) { diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirClassDeclaredMemberScope.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirClassDeclaredMemberScope.kt index cb25670fd92..e155c77cddd 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirClassDeclaredMemberScope.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirClassDeclaredMemberScope.kt @@ -66,7 +66,6 @@ class FirClassDeclaredMemberScope( val symbols = callablesIndex[name] ?: emptyList() for (symbol in symbols) { if (symbol is D) { - symbol.ensureResolvedForCalls() processor(symbol) } } diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/IdeFirPhaseManager.kt b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/IdeFirPhaseManager.kt index 15eab0acf81..b0c94c63aca 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/IdeFirPhaseManager.kt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/IdeFirPhaseManager.kt @@ -27,7 +27,7 @@ internal class IdeFirPhaseManager( ) { val fir = symbol.fir as FirDeclaration try { - if (fir.resolvePhase < requiredPhase) { //TODO Make thread safe + if (fir.resolvePhase < requiredPhase) { lazyDeclarationResolver.lazyResolveDeclaration( firDeclarationToResolve = fir, moduleFileCache = cache, diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/file/structure/FileStructureElement.kt b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/file/structure/FileStructureElement.kt index c437e704c2a..6496795a80f 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/file/structure/FileStructureElement.kt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/file/structure/FileStructureElement.kt @@ -26,7 +26,6 @@ import org.jetbrains.kotlin.idea.fir.low.level.api.lazy.resolve.RawFirNonLocalDe import org.jetbrains.kotlin.idea.fir.low.level.api.lazy.resolve.declarationCanBeLazilyResolved import org.jetbrains.kotlin.idea.fir.low.level.api.providers.FirIdeProvider import org.jetbrains.kotlin.idea.fir.low.level.api.providers.firIdeProvider -import org.jetbrains.kotlin.idea.fir.low.level.api.transformers.FirLazyTransformerForIDE.Companion.resolvePhaseForDeclarationAndChildren import org.jetbrains.kotlin.psi.* import java.util.concurrent.ConcurrentHashMap @@ -137,7 +136,7 @@ internal class ReanalyzableFunctionStructureElement( replaceResolvePhase(upgradedPhase) } designation.toSequence(includeTarget = true).forEach { - it.resolvePhaseForDeclarationAndChildren = minOf(it.resolvePhaseForDeclarationAndChildren, upgradedPhase) + it.replaceResolvePhase(minOf(it.resolvePhase, upgradedPhase)) } firLazyDeclarationResolver.lazyResolveDeclaration( @@ -146,7 +145,6 @@ internal class ReanalyzableFunctionStructureElement( scopeSession = ScopeSession(), toPhase = FirResolvePhase.BODY_RESOLVE, checkPCE = true, - declarationPhaseDowngraded = true, ) ReanalyzableFunctionStructureElement( @@ -206,7 +204,6 @@ internal class ReanalyzablePropertyStructureElement( scopeSession = ScopeSession(), toPhase = FirResolvePhase.BODY_RESOLVE, checkPCE = true, - declarationPhaseDowngraded = true, ) ReanalyzablePropertyStructureElement( diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/lazy/resolve/FirLazyDeclarationResolver.kt b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/lazy/resolve/FirLazyDeclarationResolver.kt index e5232a19a9d..15f512f6028 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/lazy/resolve/FirLazyDeclarationResolver.kt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/lazy/resolve/FirLazyDeclarationResolver.kt @@ -20,11 +20,9 @@ import org.jetbrains.kotlin.idea.fir.low.level.api.file.builder.ModuleFileCache import org.jetbrains.kotlin.idea.fir.low.level.api.file.builder.runCustomResolveUnderLock import org.jetbrains.kotlin.idea.fir.low.level.api.providers.firIdeProvider import org.jetbrains.kotlin.idea.fir.low.level.api.transformers.FirFileAnnotationsResolveTransformer -import org.jetbrains.kotlin.idea.fir.low.level.api.transformers.FirLazyTransformerForIDE.Companion.resolvePhaseForAllDeclarations import org.jetbrains.kotlin.idea.fir.low.level.api.transformers.FirProviderInterceptorForIDE import org.jetbrains.kotlin.idea.fir.low.level.api.transformers.LazyTransformerFactory import org.jetbrains.kotlin.idea.fir.low.level.api.util.checkCanceled -import org.jetbrains.kotlin.idea.fir.low.level.api.util.ensurePhase import org.jetbrains.kotlin.idea.fir.low.level.api.util.findSourceNonLocalFirDeclaration internal class FirLazyDeclarationResolver(private val firFileBuilder: FirFileBuilder) { @@ -133,9 +131,10 @@ internal class FirLazyDeclarationResolver(private val firFileBuilder: FirFileBui collector: FirTowerDataContextCollector? = null, ) { if (toPhase == FirResolvePhase.RAW_FIR) return + if (firFile.resolvePhase >= toPhase) return if (firFile.resolvePhase == FirResolvePhase.RAW_FIR) { firFile.transform(FirImportResolveTransformer(firFile.moduleData.session), null) - firFile.ensurePhase(FirResolvePhase.IMPORTS) + firFile.replaceResolvePhase(FirResolvePhase.IMPORTS) } if (checkPCE) checkCanceled() if (toPhase == FirResolvePhase.IMPORTS) return @@ -154,13 +153,12 @@ internal class FirLazyDeclarationResolver(private val firFileBuilder: FirFileBui if (checkPCE) checkCanceled() val transformersToApply = designations.mapNotNull { - val needToResolve = it.resolvePhaseForAllDeclarations(includeDeclarationPhase = false) < currentPhase + val needToResolve = it.declaration.resolvePhase < currentPhase if (needToResolve) { LazyTransformerFactory.createLazyTransformer( phase = currentPhase, designation = it, scopeSession = scopeSession, - declarationPhaseDowngraded = false, moduleFileCache = moduleFileCache, lazyDeclarationResolver = this, towerDataContextCollector = null, @@ -176,6 +174,7 @@ internal class FirLazyDeclarationResolver(private val firFileBuilder: FirFileBui currentTransformer.transformDeclaration(firFileBuilder.firPhaseRunner) } } + firFile.replaceResolvePhase(currentPhase) } } @@ -191,12 +190,11 @@ internal class FirLazyDeclarationResolver(private val firFileBuilder: FirFileBui scopeSession: ScopeSession, toPhase: FirResolvePhase, checkPCE: Boolean, - declarationPhaseDowngraded: Boolean = false, skipLocalDeclaration: Boolean = false, ) { if (toPhase == FirResolvePhase.RAW_FIR) return - //TODO Should be synchronised if (!firDeclarationToResolve.isValidForResolve()) return + if (firDeclarationToResolve.resolvePhase >= toPhase) return if (firDeclarationToResolve is FirFile) { lazyResolveFileDeclaration( @@ -229,17 +227,16 @@ internal class FirLazyDeclarationResolver(private val firFileBuilder: FirFileBui firDeclarationToResolve.moduleData.session.firIdeProvider.symbolProvider, moduleFileCache ) - designation = nonLocalFirDeclaration.collectDesignationWithFile() + neededPhase = if (isLocalDeclarationResolveRequested) FirResolvePhase.BODY_RESOLVE else toPhase + + if (nonLocalFirDeclaration.resolvePhase >= neededPhase) return + if (!nonLocalFirDeclaration.isValidForResolve()) return + + designation = nonLocalFirDeclaration.collectDesignationWithFile() + } - //TODO Should be synchronised - if (!designation.declaration.isValidForResolve()) return - - //TODO Should be synchronised - val resolvePhase = designation.resolvePhaseForAllDeclarations(includeDeclarationPhase = declarationPhaseDowngraded) - if (resolvePhase >= neededPhase) return - moduleFileCache.firFileLockProvider.runCustomResolveUnderLock(designation.firFile, checkPCE) { runLazyDesignatedResolveWithoutLock( designation = designation, @@ -247,7 +244,6 @@ internal class FirLazyDeclarationResolver(private val firFileBuilder: FirFileBui scopeSession = scopeSession, toPhase = neededPhase, checkPCE = checkPCE, - declarationPhaseDowngraded = declarationPhaseDowngraded, ) } } @@ -258,10 +254,10 @@ internal class FirLazyDeclarationResolver(private val firFileBuilder: FirFileBui scopeSession: ScopeSession, toPhase: FirResolvePhase, checkPCE: Boolean, - declarationPhaseDowngraded: Boolean, ) { - val filePhase = designation.firFile.resolvePhase - if (filePhase == FirResolvePhase.RAW_FIR) { + if (designation.declaration.resolvePhase >= toPhase) return + + if (designation.firFile.resolvePhase == FirResolvePhase.RAW_FIR) { lazyResolveFileDeclarationWithoutLock( firFile = designation.firFile, moduleFileCache = moduleFileCache, @@ -271,9 +267,7 @@ internal class FirLazyDeclarationResolver(private val firFileBuilder: FirFileBui ) } if (toPhase == FirResolvePhase.IMPORTS) return - - val designationPhase = designation.resolvePhaseForAllDeclarations(includeDeclarationPhase = declarationPhaseDowngraded) - var currentPhase = maxOf(designationPhase, FirResolvePhase.IMPORTS) + var currentPhase = maxOf(designation.declaration.resolvePhase, FirResolvePhase.IMPORTS) while (currentPhase < toPhase) { currentPhase = currentPhase.next @@ -284,7 +278,6 @@ internal class FirLazyDeclarationResolver(private val firFileBuilder: FirFileBui phase = currentPhase, designation = designation, scopeSession = scopeSession, - declarationPhaseDowngraded = declarationPhaseDowngraded, moduleFileCache = moduleFileCache, lazyDeclarationResolver = this, towerDataContextCollector = null, @@ -304,7 +297,7 @@ internal class FirLazyDeclarationResolver(private val firFileBuilder: FirFileBui val scopeSession = ScopeSession() var currentPhase = maxOf(designation.declaration.resolvePhase, FirResolvePhase.IMPORTS) - val firProviderInterceptor = if(onAirCreatedDeclaration) { + val firProviderInterceptor = if (onAirCreatedDeclaration) { FirProviderInterceptorForIDE.createForFirElement( session = designation.firFile.moduleData.session, firFile = designation.firFile, @@ -321,7 +314,6 @@ internal class FirLazyDeclarationResolver(private val firFileBuilder: FirFileBui phase = currentPhase, designation = designation, scopeSession = scopeSession, - declarationPhaseDowngraded = true, moduleFileCache = moduleFileCache, lazyDeclarationResolver = this, towerDataContextCollector = towerDataContextCollector, diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirDesignatedBodyResolveTransformerForIDE.kt b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirDesignatedBodyResolveTransformerForIDE.kt index 96ef178c374..6dc31754b5b 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirDesignatedBodyResolveTransformerForIDE.kt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirDesignatedBodyResolveTransformerForIDE.kt @@ -17,11 +17,8 @@ import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.createReturnTy import org.jetbrains.kotlin.idea.fir.low.level.api.FirPhaseRunner import org.jetbrains.kotlin.idea.fir.low.level.api.api.FirDeclarationDesignationWithFile import org.jetbrains.kotlin.idea.fir.low.level.api.element.builder.FirIdeDesignatedBodyResolveTransformerForReturnTypeCalculator -import org.jetbrains.kotlin.idea.fir.low.level.api.transformers.FirLazyTransformerForIDE.Companion.isResolvedForAllDeclarations -import org.jetbrains.kotlin.idea.fir.low.level.api.transformers.FirLazyTransformerForIDE.Companion.updateResolvedPhaseForDeclarationAndChildren +import org.jetbrains.kotlin.idea.fir.low.level.api.transformers.FirLazyTransformerForIDE.Companion.updatePhaseDeep import org.jetbrains.kotlin.idea.fir.low.level.api.util.ensurePhase -import org.jetbrains.kotlin.idea.fir.low.level.api.util.ensurePhaseForClasses -import org.jetbrains.kotlin.idea.fir.low.level.api.util.isTargetCallableDeclarationAndInPhase /** * Transform designation into BODY_RESOLVE declaration. Affects only for target declaration and it's children @@ -30,7 +27,6 @@ internal class FirDesignatedBodyResolveTransformerForIDE( private val designation: FirDeclarationDesignationWithFile, session: FirSession, scopeSession: ScopeSession, - private val declarationPhaseDowngraded: Boolean, towerDataContextCollector: FirTowerDataContextCollector?, firProviderInterceptor: FirProviderInterceptor?, ) : FirLazyTransformerForIDE, FirBodyResolveTransformer( @@ -54,24 +50,16 @@ internal class FirDesignatedBodyResolveTransformerForIDE( super.transformDeclarationContent(declaration, data) } - override fun needReplacePhase(firDeclaration: FirDeclaration): Boolean = - ideDeclarationTransformer.needReplacePhase && firDeclaration !is FirFile && super.needReplacePhase(firDeclaration) - override fun transformDeclaration(phaseRunner: FirPhaseRunner) { - if (designation.isResolvedForAllDeclarations(FirResolvePhase.BODY_RESOLVE, declarationPhaseDowngraded)) return - designation.declaration.updateResolvedPhaseForDeclarationAndChildren(FirResolvePhase.BODY_RESOLVE) - if (designation.isTargetCallableDeclarationAndInPhase(FirResolvePhase.BODY_RESOLVE)) return - - (designation.declaration as? FirCallableDeclaration)?.ensurePhase(FirResolvePhase.CONTRACTS) - designation.ensurePhaseForClasses(FirResolvePhase.STATUS) + if (designation.declaration.resolvePhase >= FirResolvePhase.BODY_RESOLVE) return + designation.declaration.ensurePhase(FirResolvePhase.IMPLICIT_TYPES_BODY_RESOLVE) phaseRunner.runPhaseWithCustomResolve(FirResolvePhase.BODY_RESOLVE) { designation.firFile.transform(this, ResolutionMode.ContextIndependent) } ideDeclarationTransformer.ensureDesignationPassed() - //TODO Figure out why the phase is not updated - (designation.declaration as? FirTypeAlias)?.replaceResolvePhase(FirResolvePhase.BODY_RESOLVE) + updatePhaseDeep(designation.declaration, FirResolvePhase.BODY_RESOLVE, withNonLocalDeclarations = true) ensureResolved(designation.declaration) ensureResolvedDeep(designation.declaration) } @@ -82,8 +70,8 @@ internal class FirDesignatedBodyResolveTransformerForIDE( declaration.ensurePhase(FirResolvePhase.BODY_RESOLVE) is FirProperty -> { declaration.ensurePhase(FirResolvePhase.BODY_RESOLVE) - declaration.getter?.ensurePhase(FirResolvePhase.BODY_RESOLVE) - declaration.setter?.ensurePhase(FirResolvePhase.BODY_RESOLVE) +// declaration.getter?.ensurePhase(FirResolvePhase.BODY_RESOLVE) +// declaration.setter?.ensurePhase(FirResolvePhase.BODY_RESOLVE) } is FirEnumEntry, is FirClass -> Unit else -> error("Unexpected type: ${declaration::class.simpleName}") diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirDesignatedContractsResolveTransformerForIDE.kt b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirDesignatedContractsResolveTransformerForIDE.kt index ace1bccf44d..581609a5cc7 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirDesignatedContractsResolveTransformerForIDE.kt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirDesignatedContractsResolveTransformerForIDE.kt @@ -14,11 +14,8 @@ import org.jetbrains.kotlin.fir.resolve.transformers.contracts.FirContractResolv import org.jetbrains.kotlin.idea.fir.low.level.api.FirPhaseRunner import org.jetbrains.kotlin.idea.fir.low.level.api.api.FirDeclarationDesignationWithFile import org.jetbrains.kotlin.idea.fir.low.level.api.lazy.resolve.FirLazyBodiesCalculator -import org.jetbrains.kotlin.idea.fir.low.level.api.transformers.FirLazyTransformerForIDE.Companion.isResolvedForAllDeclarations -import org.jetbrains.kotlin.idea.fir.low.level.api.transformers.FirLazyTransformerForIDE.Companion.updateResolvedPhaseForDeclarationAndChildren -import org.jetbrains.kotlin.idea.fir.low.level.api.util.ensureDesignation +import org.jetbrains.kotlin.idea.fir.low.level.api.transformers.FirLazyTransformerForIDE.Companion.updatePhaseDeep import org.jetbrains.kotlin.idea.fir.low.level.api.util.ensurePhase -import org.jetbrains.kotlin.idea.fir.low.level.api.util.isTargetCallableDeclarationAndInPhase /** * Transform designation into CONTRACTS declaration. Affects only for target declaration and it's children @@ -27,7 +24,6 @@ internal class FirDesignatedContractsResolveTransformerForIDE( private val designation: FirDeclarationDesignationWithFile, session: FirSession, scopeSession: ScopeSession, - private val declarationPhaseDowngraded: Boolean, ) : FirLazyTransformerForIDE, FirContractResolveTransformer(session, scopeSession) { private val ideDeclarationTransformer = IDEDeclarationTransformer(designation) @@ -43,18 +39,12 @@ internal class FirDesignatedContractsResolveTransformerForIDE( override fun transformDeclarationContent(declaration: FirDeclaration, data: ResolutionMode): FirDeclaration = ideDeclarationTransformer.transformDeclarationContent(this, declaration, data) { - designation.declaration.updateResolvedPhaseForDeclarationAndChildren(FirResolvePhase.CONTRACTS) super.transformDeclarationContent(declaration, data) } - override fun needReplacePhase(firDeclaration: FirDeclaration): Boolean = - ideDeclarationTransformer.needReplacePhase && firDeclaration !is FirFile && super.needReplacePhase(firDeclaration) - override fun transformDeclaration(phaseRunner: FirPhaseRunner) { - if (designation.isResolvedForAllDeclarations(FirResolvePhase.CONTRACTS, declarationPhaseDowngraded)) return - designation.declaration.updateResolvedPhaseForDeclarationAndChildren(FirResolvePhase.CONTRACTS) - if (designation.isTargetCallableDeclarationAndInPhase(FirResolvePhase.CONTRACTS)) return - designation.ensureDesignation(FirResolvePhase.STATUS) + if (designation.declaration.resolvePhase >= FirResolvePhase.CONTRACTS) return + designation.declaration.ensurePhase(FirResolvePhase.STATUS) FirLazyBodiesCalculator.calculateLazyBodiesInside(designation) phaseRunner.runPhaseWithCustomResolve(FirResolvePhase.CONTRACTS) { @@ -62,6 +52,7 @@ internal class FirDesignatedContractsResolveTransformerForIDE( } ideDeclarationTransformer.ensureDesignationPassed() + updatePhaseDeep(designation.declaration, FirResolvePhase.CONTRACTS) ensureResolved(designation.declaration) ensureResolvedDeep(designation.declaration) } @@ -72,8 +63,8 @@ internal class FirDesignatedContractsResolveTransformerForIDE( declaration.ensurePhase(FirResolvePhase.CONTRACTS) is FirProperty -> { declaration.ensurePhase(FirResolvePhase.CONTRACTS) - declaration.getter?.ensurePhase(FirResolvePhase.CONTRACTS) - declaration.setter?.ensurePhase(FirResolvePhase.CONTRACTS) +// declaration.getter?.ensurePhase(FirResolvePhase.CONTRACTS) +// declaration.setter?.ensurePhase(FirResolvePhase.CONTRACTS) } is FirClass, is FirTypeAlias, is FirEnumEntry, is FirField -> Unit else -> error("Unexpected type: ${declaration::class.simpleName}") diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirDesignatedImplicitTypesTransformerForIDE.kt b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirDesignatedImplicitTypesTransformerForIDE.kt index 90bcfa831df..b40b14b35e1 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirDesignatedImplicitTypesTransformerForIDE.kt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirDesignatedImplicitTypesTransformerForIDE.kt @@ -17,11 +17,8 @@ import org.jetbrains.kotlin.fir.types.FirResolvedTypeRef import org.jetbrains.kotlin.idea.fir.low.level.api.FirPhaseRunner import org.jetbrains.kotlin.idea.fir.low.level.api.api.FirDeclarationDesignationWithFile import org.jetbrains.kotlin.idea.fir.low.level.api.element.builder.FirIdeDesignatedBodyResolveTransformerForReturnTypeCalculator -import org.jetbrains.kotlin.idea.fir.low.level.api.transformers.FirLazyTransformerForIDE.Companion.isResolvedForAllDeclarations -import org.jetbrains.kotlin.idea.fir.low.level.api.transformers.FirLazyTransformerForIDE.Companion.updateResolvedPhaseForDeclarationAndChildren +import org.jetbrains.kotlin.idea.fir.low.level.api.transformers.FirLazyTransformerForIDE.Companion.updatePhaseDeep import org.jetbrains.kotlin.idea.fir.low.level.api.util.ensurePhase -import org.jetbrains.kotlin.idea.fir.low.level.api.util.ensurePhaseForClasses -import org.jetbrains.kotlin.idea.fir.low.level.api.util.isTargetCallableDeclarationAndInPhase /** * Transform designation into IMPLICIT_TYPES_BODY_RESOLVE declaration. Affects only for target declaration, it's children and dependents @@ -30,7 +27,6 @@ internal class FirDesignatedImplicitTypesTransformerForIDE( private val designation: FirDeclarationDesignationWithFile, session: FirSession, scopeSession: ScopeSession, - private val declarationPhaseDowngraded: Boolean, towerDataContextCollector: FirTowerDataContextCollector?, implicitBodyResolveComputationSession: ImplicitBodyResolveComputationSession = ImplicitBodyResolveComputationSession(), ) : FirLazyTransformerForIDE, FirImplicitAwareBodyResolveTransformer( @@ -54,26 +50,16 @@ internal class FirDesignatedImplicitTypesTransformerForIDE( super.transformDeclarationContent(declaration, data) } - override fun needReplacePhase(firDeclaration: FirDeclaration): Boolean = - ideDeclarationTransformer.needReplacePhase && firDeclaration !is FirFile && super.needReplacePhase(firDeclaration) - override fun transformDeclaration(phaseRunner: FirPhaseRunner) { - if (designation.isResolvedForAllDeclarations(FirResolvePhase.IMPLICIT_TYPES_BODY_RESOLVE, declarationPhaseDowngraded)) return - designation.declaration.updateResolvedPhaseForDeclarationAndChildren(FirResolvePhase.IMPLICIT_TYPES_BODY_RESOLVE) - if (designation.isTargetCallableDeclarationAndInPhase(FirResolvePhase.IMPLICIT_TYPES_BODY_RESOLVE)) return - - val callableDeclaration = designation.declaration as? FirCallableDeclaration - if (callableDeclaration != null) { - if (callableDeclaration.returnTypeRef is FirResolvedTypeRef) return - callableDeclaration.ensurePhase(FirResolvePhase.CONTRACTS) - } - designation.ensurePhaseForClasses(FirResolvePhase.STATUS) + if (designation.declaration.resolvePhase >= FirResolvePhase.IMPLICIT_TYPES_BODY_RESOLVE) return + designation.declaration.ensurePhase(FirResolvePhase.CONTRACTS) phaseRunner.runPhaseWithCustomResolve(FirResolvePhase.IMPLICIT_TYPES_BODY_RESOLVE) { designation.firFile.transform(this, ResolutionMode.ContextIndependent) } ideDeclarationTransformer.ensureDesignationPassed() + updatePhaseDeep(designation.declaration, FirResolvePhase.IMPLICIT_TYPES_BODY_RESOLVE) ensureResolved(designation.declaration) ensureResolvedDeep(designation.declaration) } diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirDesignatedStatusResolveTransformerForIDE.kt b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirDesignatedStatusResolveTransformerForIDE.kt index c838532eb0c..e8fb4dd0d44 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirDesignatedStatusResolveTransformerForIDE.kt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirDesignatedStatusResolveTransformerForIDE.kt @@ -13,9 +13,7 @@ import org.jetbrains.kotlin.fir.resolve.transformers.FirStatusResolveTransformer import org.jetbrains.kotlin.fir.resolve.transformers.StatusComputationSession import org.jetbrains.kotlin.idea.fir.low.level.api.FirPhaseRunner import org.jetbrains.kotlin.idea.fir.low.level.api.api.FirDeclarationDesignationWithFile -import org.jetbrains.kotlin.idea.fir.low.level.api.transformers.FirLazyTransformerForIDE.Companion.isResolvedForAllDeclarations -import org.jetbrains.kotlin.idea.fir.low.level.api.transformers.FirLazyTransformerForIDE.Companion.updateResolvedPhaseForDeclarationAndChildren -import org.jetbrains.kotlin.idea.fir.low.level.api.util.ensureDesignation +import org.jetbrains.kotlin.idea.fir.low.level.api.transformers.FirLazyTransformerForIDE.Companion.updatePhaseDeep import org.jetbrains.kotlin.idea.fir.low.level.api.util.ensurePhase /** @@ -25,16 +23,12 @@ internal class FirDesignatedStatusResolveTransformerForIDE( private val designation: FirDeclarationDesignationWithFile, private val session: FirSession, private val scopeSession: ScopeSession, - private val declarationPhaseDowngraded: Boolean, ) : FirLazyTransformerForIDE { private inner class FirDesignatedStatusResolveTransformerForIDE : FirStatusResolveTransformer(session, scopeSession, StatusComputationSession.Regular()) { val designationTransformer = IDEDeclarationTransformer(designation) - override fun needReplacePhase(firDeclaration: FirDeclaration): Boolean = - firDeclaration !is FirFile && super.needReplacePhase(firDeclaration) - override fun transformDeclarationContent(declaration: FirDeclaration, data: FirResolvedDeclarationStatus?): FirDeclaration = designationTransformer.transformDeclarationContent(this, declaration, data) { super.transformDeclarationContent(declaration, data) @@ -42,9 +36,8 @@ internal class FirDesignatedStatusResolveTransformerForIDE( } override fun transformDeclaration(phaseRunner: FirPhaseRunner) { - if (designation.isResolvedForAllDeclarations(FirResolvePhase.STATUS, declarationPhaseDowngraded)) return - designation.declaration.updateResolvedPhaseForDeclarationAndChildren(FirResolvePhase.STATUS) - designation.ensureDesignation(FirResolvePhase.TYPES) + if (designation.declaration.resolvePhase >= FirResolvePhase.STATUS) return + designation.declaration.ensurePhase(FirResolvePhase.TYPES) val transformer = FirDesignatedStatusResolveTransformerForIDE() phaseRunner.runPhaseWithCustomResolve(FirResolvePhase.STATUS) { @@ -52,7 +45,7 @@ internal class FirDesignatedStatusResolveTransformerForIDE( } transformer.designationTransformer.ensureDesignationPassed() - designation.path.forEach(::ensureResolved) + updatePhaseDeep(designation.declaration, FirResolvePhase.STATUS) ensureResolved(designation.declaration) ensureResolvedDeep(designation.declaration) } diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirDesignatedSupertypeResolverTransformerForIDE.kt b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirDesignatedSupertypeResolverTransformerForIDE.kt index 5a2bb4017ce..74ad543caeb 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirDesignatedSupertypeResolverTransformerForIDE.kt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirDesignatedSupertypeResolverTransformerForIDE.kt @@ -8,7 +8,6 @@ package org.jetbrains.kotlin.idea.fir.low.level.api.transformers import org.jetbrains.kotlin.fir.FirElement import org.jetbrains.kotlin.fir.FirSession import org.jetbrains.kotlin.fir.declarations.* -import org.jetbrains.kotlin.fir.expressions.FirStatement import org.jetbrains.kotlin.fir.java.declarations.FirJavaClass import org.jetbrains.kotlin.fir.resolve.ScopeSession import org.jetbrains.kotlin.fir.resolve.transformers.* @@ -21,8 +20,7 @@ import org.jetbrains.kotlin.idea.fir.low.level.api.api.collectDesignation import org.jetbrains.kotlin.idea.fir.low.level.api.file.builder.ModuleFileCache import org.jetbrains.kotlin.idea.fir.low.level.api.file.builder.runCustomResolveUnderLock import org.jetbrains.kotlin.idea.fir.low.level.api.lazy.resolve.FirLazyDeclarationResolver -import org.jetbrains.kotlin.idea.fir.low.level.api.transformers.FirLazyTransformerForIDE.Companion.isResolvedForAllDeclarations -import org.jetbrains.kotlin.idea.fir.low.level.api.transformers.FirLazyTransformerForIDE.Companion.updateResolvedPhaseForDeclarationAndChildren +import org.jetbrains.kotlin.idea.fir.low.level.api.transformers.FirLazyTransformerForIDE.Companion.updatePhaseDeep import org.jetbrains.kotlin.idea.fir.low.level.api.util.checkCanceled import org.jetbrains.kotlin.idea.fir.low.level.api.util.ensurePhase @@ -33,7 +31,6 @@ internal class FirDesignatedSupertypeResolverTransformerForIDE( private val designation: FirDeclarationDesignationWithFile, private val session: FirSession, private val scopeSession: ScopeSession, - private val declarationPhaseDowngraded: Boolean, private val moduleFileCache: ModuleFileCache, private val firLazyDeclarationResolver: FirLazyDeclarationResolver, private val firProviderInterceptor: FirProviderInterceptor?, @@ -64,27 +61,6 @@ internal class FirDesignatedSupertypeResolverTransformerForIDE( private inner class DesignatedFirApplySupertypesTransformer(classDesignation: FirDeclarationDesignation) : FirApplySupertypesTransformer(supertypeComputationSession) { - override fun needReplacePhase(firDeclaration: FirDeclaration): Boolean = - firDeclaration !is FirFile && super.needReplacePhase(firDeclaration) - - override fun transformRegularClass(regularClass: FirRegularClass, data: Any?): FirStatement { - return if (regularClass.resolvePhase >= FirResolvePhase.SUPER_TYPES) - transformDeclarationContent(regularClass, data) as FirStatement - else super.transformRegularClass(regularClass, data) - } - - override fun transformAnonymousObject(anonymousObject: FirAnonymousObject, data: Any?): FirStatement { - return if (anonymousObject.resolvePhase >= FirResolvePhase.SUPER_TYPES) - transformDeclarationContent(anonymousObject, data) as FirStatement - else super.transformAnonymousObject(anonymousObject, data) - } - - override fun transformTypeAlias(typeAlias: FirTypeAlias, data: Any?): FirStatement { - return if (typeAlias.resolvePhase >= FirResolvePhase.SUPER_TYPES) - transformDeclarationContent(typeAlias, data) as FirTypeAlias - else super.transformTypeAlias(typeAlias, data) - } - val declarationTransformer = IDEDeclarationTransformer(classDesignation) override fun transformDeclarationContent(declaration: FirDeclaration, data: Any?): FirDeclaration { @@ -153,27 +129,26 @@ internal class FirDesignatedSupertypeResolverTransformerForIDE( } override fun transformDeclaration(phaseRunner: FirPhaseRunner) { - check(designation.firFile.resolvePhase >= FirResolvePhase.IMPORTS) { - "Invalid resolve phase of file. Should be IMPORTS but found ${designation.firFile.resolvePhase}" - } + if (designation.declaration.resolvePhase >= FirResolvePhase.SUPER_TYPES) return + designation.firFile.ensurePhase(FirResolvePhase.IMPORTS) val targetDesignation = if (designation.declaration !is FirClassLikeDeclaration) { - val resolvableTarget = designation.path.lastOrNull() ?: return + val resolvableTarget = designation.path.lastOrNull() + if (resolvableTarget == null) { + updatePhaseDeep(designation.declaration, FirResolvePhase.SUPER_TYPES) + return + } check(resolvableTarget is FirClassLikeDeclaration) val targetPath = designation.path.dropLast(1) FirDeclarationDesignationWithFile(targetPath, resolvableTarget, designation.firFile) } else designation - if (targetDesignation.isResolvedForAllDeclarations(FirResolvePhase.SUPER_TYPES, declarationPhaseDowngraded)) return - targetDesignation.declaration.updateResolvedPhaseForDeclarationAndChildren(FirResolvePhase.SUPER_TYPES) - phaseRunner.runPhaseWithCustomResolve(FirResolvePhase.SUPER_TYPES) { val collected = collect(targetDesignation) supertypeComputationSession.breakLoops(session) apply(collected) } - - designation.path.forEach(::ensureResolved) + updatePhaseDeep(designation.declaration, FirResolvePhase.SUPER_TYPES) ensureResolved(designation.declaration) ensureResolvedDeep(designation.declaration) } diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirDesignatedTypeResolverTransformerForIDE.kt b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirDesignatedTypeResolverTransformerForIDE.kt index e0cacc66ba8..84b7f774ef8 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirDesignatedTypeResolverTransformerForIDE.kt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirDesignatedTypeResolverTransformerForIDE.kt @@ -14,10 +14,8 @@ import org.jetbrains.kotlin.fir.types.FirImplicitTypeRef import org.jetbrains.kotlin.fir.types.FirResolvedTypeRef import org.jetbrains.kotlin.idea.fir.low.level.api.FirPhaseRunner import org.jetbrains.kotlin.idea.fir.low.level.api.api.FirDeclarationDesignationWithFile -import org.jetbrains.kotlin.idea.fir.low.level.api.transformers.FirLazyTransformerForIDE.Companion.isResolvedForAllDeclarations -import org.jetbrains.kotlin.idea.fir.low.level.api.transformers.FirLazyTransformerForIDE.Companion.updateResolvedPhaseForDeclarationAndChildren +import org.jetbrains.kotlin.idea.fir.low.level.api.transformers.FirLazyTransformerForIDE.Companion.updatePhaseDeep import org.jetbrains.kotlin.idea.fir.low.level.api.util.ensurePhase -import org.jetbrains.kotlin.idea.fir.low.level.api.util.ensurePhaseForClasses /** * Transform designation into TYPES phase. Affects only for designation, target declaration and it's children @@ -26,7 +24,6 @@ internal class FirDesignatedTypeResolverTransformerForIDE( private val designation: FirDeclarationDesignationWithFile, session: FirSession, scopeSession: ScopeSession, - private val declarationPhaseDowngraded: Boolean, ) : FirLazyTransformerForIDE, FirTypeResolveTransformer(session, scopeSession) { private val declarationTransformer = IDEDeclarationTransformer(designation) @@ -43,17 +40,16 @@ internal class FirDesignatedTypeResolverTransformerForIDE( } override fun transformDeclaration(phaseRunner: FirPhaseRunner) { - if (designation.isResolvedForAllDeclarations(FirResolvePhase.TYPES, declarationPhaseDowngraded)) return - designation.declaration.updateResolvedPhaseForDeclarationAndChildren(FirResolvePhase.TYPES) - designation.ensurePhaseForClasses(FirResolvePhase.SUPER_TYPES) + if (designation.declaration.resolvePhase >= FirResolvePhase.TYPES) return + designation.declaration.ensurePhase(FirResolvePhase.SUPER_TYPES) phaseRunner.runPhaseWithCustomResolve(FirResolvePhase.TYPES) { designation.firFile.transform(this, null) } declarationTransformer.ensureDesignationPassed() + updatePhaseDeep(designation.declaration, FirResolvePhase.TYPES) - designation.path.forEach(::ensureResolved) ensureResolved(designation.declaration) ensureResolvedDeep(designation.declaration) } diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirFileAnnotationsResolveTransformer.kt b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirFileAnnotationsResolveTransformer.kt index a8589228599..d21c16cb2f1 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirFileAnnotationsResolveTransformer.kt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirFileAnnotationsResolveTransformer.kt @@ -55,6 +55,4 @@ internal class FirFileAnnotationsResolveTransformer( } override fun ensureResolved(declaration: FirDeclaration) = error("Not implemented") - - override fun needReplacePhase(firDeclaration: FirDeclaration): Boolean = false } diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirLazyTransformerForIDE.kt b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirLazyTransformerForIDE.kt index 13f4fb8e7c8..e0f93a9799a 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirLazyTransformerForIDE.kt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/FirLazyTransformerForIDE.kt @@ -6,7 +6,10 @@ package org.jetbrains.kotlin.idea.fir.low.level.api.transformers import org.jetbrains.annotations.TestOnly +import org.jetbrains.kotlin.fir.FirElement import org.jetbrains.kotlin.fir.declarations.* +import org.jetbrains.kotlin.fir.declarations.impl.FirDefaultPropertyAccessor +import org.jetbrains.kotlin.fir.visitors.FirVisitor import org.jetbrains.kotlin.idea.fir.low.level.api.FirPhaseRunner import org.jetbrains.kotlin.idea.fir.low.level.api.api.FirDeclarationDesignation @@ -22,48 +25,81 @@ internal interface FirLazyTransformerForIDE { } companion object { + private object WholeTreePhaseUpdater : FirVisitor() { + override fun visitElement(element: FirElement, data: FirResolvePhase) { + if (element is FirDeclaration) { + if (element.resolvePhase >= data && element !is FirDefaultPropertyAccessor) return + element.replaceResolvePhase(data) + } + element.acceptChildren(this, data) + } + } + + private fun updatePhaseForNonLocals(element: FirDeclaration, newPhase: FirResolvePhase) { + if (element.resolvePhase >= newPhase) return + element.replaceResolvePhase(newPhase) + + when (element) { + is FirProperty -> { + element.getter?.run { if (resolvePhase < newPhase) replaceResolvePhase(newPhase) } + element.setter?.run { if (resolvePhase < newPhase) replaceResolvePhase(newPhase) } + } + is FirClass -> { + element.declarations.forEach { + updatePhaseForNonLocals(it, newPhase) + } + } + else -> Unit + } + } + + fun updatePhaseDeep(element: FirDeclaration, newPhase: FirResolvePhase, withNonLocalDeclarations: Boolean = false) { + if (withNonLocalDeclarations) { + WholeTreePhaseUpdater.visitElement(element, newPhase) + } else { + updatePhaseForNonLocals(element, newPhase) + } + } + internal var enableDeepEnsure: Boolean = false @TestOnly set - private object ResolvePhaseWithForAllDeclarationsKey : FirDeclarationDataKey() +// private object ResolvePhaseWithForAllDeclarationsKey : FirDeclarationDataKey() - private var FirDeclaration.resolvePhaseForDeclarationAndChildrenAttr: FirResolvePhase? - by FirDeclarationDataRegistry.data(ResolvePhaseWithForAllDeclarationsKey) +// private var FirDeclaration.resolvePhaseForDeclarationAndChildrenAttr: FirResolvePhase? +// by FirDeclarationDataRegistry.data(ResolvePhaseWithForAllDeclarationsKey) +// +// /** +// * This resolve phase is used to check if current declaration and it's children were resolved for phase +// */ +// var FirDeclaration.resolvePhaseForDeclarationAndChildren: FirResolvePhase +// get() = resolvePhaseForDeclarationAndChildrenAttr ?: FirResolvePhase.RAW_FIR +// set(value) { +// resolvePhaseForDeclarationAndChildrenAttr = value +// } +// +// fun FirDeclaration.updateResolvedPhaseForDeclarationAndChildren(phase: FirResolvePhase) { +// val allDeclaration = resolvePhaseForDeclarationAndChildren +// if (allDeclaration < phase) { +// resolvePhaseForDeclarationAndChildren = phase +// } +// } - /** - * This resolve phase is used to check if current declaration and it's children were resolved for phase - */ - var FirDeclaration.resolvePhaseForDeclarationAndChildren: FirResolvePhase - get() = resolvePhaseForDeclarationAndChildrenAttr ?: FirResolvePhase.RAW_FIR - set(value) { - resolvePhaseForDeclarationAndChildrenAttr = value - } - - fun FirDeclaration.updateResolvedPhaseForDeclarationAndChildren(phase: FirResolvePhase) { - val allDeclaration = resolvePhaseForDeclarationAndChildren - if (allDeclaration < phase) { - resolvePhaseForDeclarationAndChildren = phase - } - } - - fun FirDeclarationDesignation.resolvePhaseForAllDeclarations(includeDeclarationPhase: Boolean): FirResolvePhase { - //resolvePhaseWithForAllDeclarations for these origins are derived from original declaration - val includeTarget = when (declaration.origin) { - is FirDeclarationOrigin.SubstitutionOverride, - is FirDeclarationOrigin.IntersectionOverride, - is FirDeclarationOrigin.Delegated -> false - else -> true - } - - val allContaining = toSequence(includeTarget = includeTarget) - .maxByOrNull { it.resolvePhaseForDeclarationAndChildren } - ?.resolvePhaseForDeclarationAndChildren - ?: FirResolvePhase.RAW_FIR - return if (includeDeclarationPhase) minOf(declaration.resolvePhase, allContaining) else allContaining - } - - fun FirDeclarationDesignation.isResolvedForAllDeclarations(phase: FirResolvePhase, includeDeclarationPhase: Boolean) = - resolvePhaseForAllDeclarations(includeDeclarationPhase) >= phase +// fun FirDeclarationDesignation.resolvePhaseForAllDeclarations(includeDeclarationPhase: Boolean): FirResolvePhase { +// //resolvePhaseWithForAllDeclarations for these origins are derived from original declaration +// val includeTarget = when (declaration.origin) { +// is FirDeclarationOrigin.SubstitutionOverride, +// is FirDeclarationOrigin.IntersectionOverride, +// is FirDeclarationOrigin.Delegated -> false +// else -> true +// } +// +// val allContaining = toSequence(includeTarget = includeTarget) +// .maxByOrNull { it.resolvePhase } +// ?.resolvePhase +// ?: FirResolvePhase.RAW_FIR +// return if (includeDeclarationPhase) minOf(declaration.resolvePhase, allContaining) else allContaining +// } val DUMMY = object : FirLazyTransformerForIDE { override fun transformDeclaration(phaseRunner: FirPhaseRunner) = Unit diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/IDEDeclarationTransformer.kt b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/IDEDeclarationTransformer.kt index 780363da762..dd7d4b56136 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/IDEDeclarationTransformer.kt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/IDEDeclarationTransformer.kt @@ -69,8 +69,6 @@ internal class IDEDeclarationTransformer(private val designation: FirDeclaration return declaration } - val needReplacePhase: Boolean get() = isInsideTargetDeclaration - fun ensureDesignationPassed() { check(designationPassed) { "Designation not passed for declaration ${designation.declaration::class.simpleName}" } } diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/LazyTransformerFactory.kt b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/LazyTransformerFactory.kt index 903208dacf3..a474021e5cb 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/LazyTransformerFactory.kt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/src/org/jetbrains/kotlin/idea/fir/low/level/api/transformers/LazyTransformerFactory.kt @@ -18,7 +18,6 @@ internal object LazyTransformerFactory { phase: FirResolvePhase, designation: FirDeclarationDesignationWithFile, scopeSession: ScopeSession, - declarationPhaseDowngraded: Boolean, moduleFileCache: ModuleFileCache, lazyDeclarationResolver: FirLazyDeclarationResolver, towerDataContextCollector: FirTowerDataContextCollector?, @@ -30,7 +29,6 @@ internal object LazyTransformerFactory { designation = designation, session = designation.firFile.moduleData.session, scopeSession = scopeSession, - declarationPhaseDowngraded = declarationPhaseDowngraded, moduleFileCache = moduleFileCache, firLazyDeclarationResolver = lazyDeclarationResolver, firProviderInterceptor = firProviderInterceptor, @@ -40,32 +38,27 @@ internal object LazyTransformerFactory { designation, designation.firFile.moduleData.session, scopeSession, - declarationPhaseDowngraded, ) FirResolvePhase.STATUS -> FirDesignatedStatusResolveTransformerForIDE( designation, designation.firFile.moduleData.session, scopeSession, - declarationPhaseDowngraded, ) FirResolvePhase.CONTRACTS -> FirDesignatedContractsResolveTransformerForIDE( designation, designation.firFile.moduleData.session, scopeSession, - declarationPhaseDowngraded, ) FirResolvePhase.IMPLICIT_TYPES_BODY_RESOLVE -> FirDesignatedImplicitTypesTransformerForIDE( designation, designation.firFile.moduleData.session, scopeSession, - declarationPhaseDowngraded, towerDataContextCollector ) FirResolvePhase.BODY_RESOLVE -> FirDesignatedBodyResolveTransformerForIDE( designation, designation.firFile.moduleData.session, scopeSession, - declarationPhaseDowngraded, towerDataContextCollector, firProviderInterceptor, ) diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/annotations.txt b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/annotations.txt index 89d86e6a26f..6ed37186d49 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/annotations.txt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/annotations.txt @@ -13,37 +13,37 @@ FILE: annotations.kt SUPER_TYPES: FILE: annotations.kt @FILE:Suppress(String(1)) - @Suppress(String(2)) public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { + @Suppress(String(2)) public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { } TYPES: FILE: annotations.kt @FILE:Suppress(String(1)) - @R|kotlin/Suppress|(String(2)) public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + @R|kotlin/Suppress|(String(2)) public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { } STATUS: FILE: annotations.kt @FILE:Suppress(String(1)) - @R|kotlin/Suppress|(String(2)) public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun resolveMe(): R|kotlin/Unit| { + @R|kotlin/Suppress|(String(2)) public final [STATUS] fun resolveMe(): R|kotlin/Unit| { } CONTRACTS: FILE: annotations.kt @FILE:Suppress(String(1)) - @R|kotlin/Suppress|(String(2)) public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] fun resolveMe(): R|kotlin/Unit| { + @R|kotlin/Suppress|(String(2)) public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { } IMPLICIT_TYPES_BODY_RESOLVE: FILE: annotations.kt @FILE:Suppress(String(1)) - @R|kotlin/Suppress|(String(2)) public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + @R|kotlin/Suppress|(String(2)) public final [IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { } BODY_RESOLVE: FILE: annotations.kt @FILE:Suppress(String(1)) - @R|kotlin/Suppress|(vararg(String(2))) public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + @R|kotlin/Suppress|(vararg(String(2))) public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { } NoResolve: @@ -55,13 +55,13 @@ FILE: annotations.kt BodyResolveWithChildren: FILE: annotations.kt @FILE:Suppress(String(1)) - @R|kotlin/Suppress|(vararg(String(2))) public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + @R|kotlin/Suppress|(vararg(String(2))) public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { } CallableBodyResolve: FILE: annotations.kt @FILE:Suppress(String(1)) - @R|kotlin/Suppress|(vararg(String(2))) public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + @R|kotlin/Suppress|(vararg(String(2))) public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { } CallableReturnType: @@ -73,41 +73,41 @@ FILE: annotations.kt AnnotationType: FILE: annotations.kt @FILE:Suppress(String(1)) - @R|kotlin/Suppress|(String(2)) public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + @R|kotlin/Suppress|(String(2)) public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { } AnnotationsArguments: FILE: annotations.kt @FILE:Suppress(String(1)) - @R|kotlin/Suppress|(vararg(String(2))) public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + @R|kotlin/Suppress|(vararg(String(2))) public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { } CallableContracts: FILE: annotations.kt @FILE:Suppress(String(1)) - @R|kotlin/Suppress|(String(2)) public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] fun resolveMe(): R|kotlin/Unit| { + @R|kotlin/Suppress|(String(2)) public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { } DeclarationStatus: FILE: annotations.kt @FILE:Suppress(String(1)) - @R|kotlin/Suppress|(String(2)) public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun resolveMe(): R|kotlin/Unit| { + @R|kotlin/Suppress|(String(2)) public final [STATUS] fun resolveMe(): R|kotlin/Unit| { } ValueParametersTypes: FILE: annotations.kt @FILE:Suppress(String(1)) - @R|kotlin/Suppress|(String(2)) public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + @R|kotlin/Suppress|(String(2)) public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { } TypeParametersTypes: FILE: annotations.kt @FILE:Suppress(String(1)) - @R|kotlin/Suppress|(String(2)) public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + @R|kotlin/Suppress|(String(2)) public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { } FILE RAW TO BODY: FILE: annotations.kt @FILE:R|kotlin/Suppress|(vararg(String(1))) - @R|kotlin/Suppress|(vararg(String(2))) public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + @R|kotlin/Suppress|(vararg(String(2))) public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { } diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/classMembers.txt b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/classMembers.txt index ea284d8eb64..2f141f3abb5 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/classMembers.txt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/classMembers.txt @@ -1,4 +1,3 @@ - RAW_FIR: FILE: classMembers.kt public? final? [RAW_FIR] class A : R|kotlin/Any| { @@ -51,12 +50,12 @@ FILE: classMembers.kt SUPER_TYPES: FILE: classMembers.kt - public? final? [SUPER_TYPES] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { + public? final? [RAW_FIR] class A : R|kotlin/Any| { public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { super() } - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { + public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } @@ -76,24 +75,24 @@ FILE: classMembers.kt TYPES: FILE: classMembers.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public? final? [SUPER_TYPES] class A : R|kotlin/Any| { + public? [SUPER_TYPES] [ContainingClassKey=A] constructor(): R|A| { super() } - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } - public? final? [RAW_FIR] val x: Int = IntegerLiteral(10) - [RAW_FIR] [ContainingClassKey=A] public? get(): Int { + public? final? [SUPER_TYPES] val x: Int = IntegerLiteral(10) + [SUPER_TYPES] [ContainingClassKey=A] public? get(): Int { ^ field# } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { + public? final? [SUPER_TYPES] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { + public? final? [SUPER_TYPES] fun functionWithLazyBody(): String { ^functionWithLazyBody String(42) } @@ -101,24 +100,24 @@ FILE: classMembers.kt STATUS: FILE: classMembers.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [SUPER_TYPES] class A : R|kotlin/Any| { + public? [SUPER_TYPES] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun resolveMe(): R|kotlin/Unit| { + public final [STATUS] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } - public? final? [RAW_FIR] val x: Int = IntegerLiteral(10) - [RAW_FIR] [ContainingClassKey=A] public? get(): Int { + public? final? [SUPER_TYPES] val x: Int = IntegerLiteral(10) + [SUPER_TYPES] [ContainingClassKey=A] public? get(): Int { ^ field# } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { + public? final? [SUPER_TYPES] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { + public? final? [SUPER_TYPES] fun functionWithLazyBody(): String { ^functionWithLazyBody String(42) } @@ -126,24 +125,24 @@ FILE: classMembers.kt CONTRACTS: FILE: classMembers.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [SUPER_TYPES] class A : R|kotlin/Any| { + public? [SUPER_TYPES] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] fun resolveMe(): R|kotlin/Unit| { + public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } - public? final? [RAW_FIR] val x: Int = IntegerLiteral(10) - [RAW_FIR] [ContainingClassKey=A] public? get(): Int { + public? final? [SUPER_TYPES] val x: Int = IntegerLiteral(10) + [SUPER_TYPES] [ContainingClassKey=A] public? get(): Int { ^ field# } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { + public? final? [SUPER_TYPES] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { + public? final? [SUPER_TYPES] fun functionWithLazyBody(): String { ^functionWithLazyBody String(42) } @@ -151,24 +150,24 @@ FILE: classMembers.kt IMPLICIT_TYPES_BODY_RESOLVE: FILE: classMembers.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } - public? final? [RAW_FIR] val x: Int = IntegerLiteral(10) - [RAW_FIR] [ContainingClassKey=A] public? get(): Int { + public final [STATUS] val x: R|kotlin/Int| = IntegerLiteral(10) + [STATUS] [ContainingClassKey=A] public get(): R|kotlin/Int| { ^ field# } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { + public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { ^functionWithLazyBody String(42) } @@ -176,24 +175,24 @@ FILE: classMembers.kt BODY_RESOLVE: FILE: classMembers.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { this@R|/A|.R|/A.receive|(this@R|/A|.R|/A.functionWithLazyBody|()) } - public? final? [RAW_FIR] val x: Int = IntegerLiteral(10) - [RAW_FIR] [ContainingClassKey=A] public? get(): Int { + public final [STATUS] val x: R|kotlin/Int| = IntegerLiteral(10) + [STATUS] [ContainingClassKey=A] public get(): R|kotlin/Int| { ^ field# } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|kotlin/String|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun functionWithLazyBody(): R|kotlin/String| { + public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { ^functionWithLazyBody String(42) } @@ -226,24 +225,24 @@ FILE: classMembers.kt BodyResolveWithChildren: FILE: classMembers.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { this@R|/A|.R|/A.receive|(this@R|/A|.R|/A.functionWithLazyBody|()) } - public? final? [RAW_FIR] val x: Int = IntegerLiteral(10) - [RAW_FIR] [ContainingClassKey=A] public? get(): Int { + public final [STATUS] val x: R|kotlin/Int| = IntegerLiteral(10) + [STATUS] [ContainingClassKey=A] public get(): R|kotlin/Int| { ^ field# } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|kotlin/String|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun functionWithLazyBody(): R|kotlin/String| { + public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { ^functionWithLazyBody String(42) } @@ -251,24 +250,24 @@ FILE: classMembers.kt CallableBodyResolve: FILE: classMembers.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { this@R|/A|.R|/A.receive|(this@R|/A|.R|/A.functionWithLazyBody|()) } - public? final? [RAW_FIR] val x: Int = IntegerLiteral(10) - [RAW_FIR] [ContainingClassKey=A] public? get(): Int { + public final [STATUS] val x: R|kotlin/Int| = IntegerLiteral(10) + [STATUS] [ContainingClassKey=A] public get(): R|kotlin/Int| { ^ field# } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|kotlin/String|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun functionWithLazyBody(): R|kotlin/String| { + public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { ^functionWithLazyBody String(42) } @@ -301,24 +300,24 @@ FILE: classMembers.kt AnnotationType: FILE: classMembers.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public? final? [SUPER_TYPES] class A : R|kotlin/Any| { + public? [SUPER_TYPES] [ContainingClassKey=A] constructor(): R|A| { super() } - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } - public? final? [RAW_FIR] val x: Int = IntegerLiteral(10) - [RAW_FIR] [ContainingClassKey=A] public? get(): Int { + public? final? [SUPER_TYPES] val x: Int = IntegerLiteral(10) + [SUPER_TYPES] [ContainingClassKey=A] public? get(): Int { ^ field# } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { + public? final? [SUPER_TYPES] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { + public? final? [SUPER_TYPES] fun functionWithLazyBody(): String { ^functionWithLazyBody String(42) } @@ -326,24 +325,24 @@ FILE: classMembers.kt AnnotationsArguments: FILE: classMembers.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { this@R|/A|.R|/A.receive|(this@R|/A|.R|/A.functionWithLazyBody|()) } - public? final? [RAW_FIR] val x: Int = IntegerLiteral(10) - [RAW_FIR] [ContainingClassKey=A] public? get(): Int { + public final [STATUS] val x: R|kotlin/Int| = IntegerLiteral(10) + [STATUS] [ContainingClassKey=A] public get(): R|kotlin/Int| { ^ field# } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|kotlin/String|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun functionWithLazyBody(): R|kotlin/String| { + public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { ^functionWithLazyBody String(42) } @@ -351,24 +350,24 @@ FILE: classMembers.kt CallableContracts: FILE: classMembers.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [SUPER_TYPES] class A : R|kotlin/Any| { + public? [SUPER_TYPES] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] fun resolveMe(): R|kotlin/Unit| { + public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } - public? final? [RAW_FIR] val x: Int = IntegerLiteral(10) - [RAW_FIR] [ContainingClassKey=A] public? get(): Int { + public? final? [SUPER_TYPES] val x: Int = IntegerLiteral(10) + [SUPER_TYPES] [ContainingClassKey=A] public? get(): Int { ^ field# } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { + public? final? [SUPER_TYPES] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { + public? final? [SUPER_TYPES] fun functionWithLazyBody(): String { ^functionWithLazyBody String(42) } @@ -376,24 +375,24 @@ FILE: classMembers.kt DeclarationStatus: FILE: classMembers.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [SUPER_TYPES] class A : R|kotlin/Any| { + public? [SUPER_TYPES] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun resolveMe(): R|kotlin/Unit| { + public final [STATUS] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } - public? final? [RAW_FIR] val x: Int = IntegerLiteral(10) - [RAW_FIR] [ContainingClassKey=A] public? get(): Int { + public? final? [SUPER_TYPES] val x: Int = IntegerLiteral(10) + [SUPER_TYPES] [ContainingClassKey=A] public? get(): Int { ^ field# } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { + public? final? [SUPER_TYPES] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { + public? final? [SUPER_TYPES] fun functionWithLazyBody(): String { ^functionWithLazyBody String(42) } @@ -401,24 +400,24 @@ FILE: classMembers.kt ValueParametersTypes: FILE: classMembers.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public? final? [SUPER_TYPES] class A : R|kotlin/Any| { + public? [SUPER_TYPES] [ContainingClassKey=A] constructor(): R|A| { super() } - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } - public? final? [RAW_FIR] val x: Int = IntegerLiteral(10) - [RAW_FIR] [ContainingClassKey=A] public? get(): Int { + public? final? [SUPER_TYPES] val x: Int = IntegerLiteral(10) + [SUPER_TYPES] [ContainingClassKey=A] public? get(): Int { ^ field# } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { + public? final? [SUPER_TYPES] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { + public? final? [SUPER_TYPES] fun functionWithLazyBody(): String { ^functionWithLazyBody String(42) } @@ -426,24 +425,24 @@ FILE: classMembers.kt TypeParametersTypes: FILE: classMembers.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public? final? [SUPER_TYPES] class A : R|kotlin/Any| { + public? [SUPER_TYPES] [ContainingClassKey=A] constructor(): R|A| { super() } - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } - public? final? [RAW_FIR] val x: Int = IntegerLiteral(10) - [RAW_FIR] [ContainingClassKey=A] public? get(): Int { + public? final? [SUPER_TYPES] val x: Int = IntegerLiteral(10) + [SUPER_TYPES] [ContainingClassKey=A] public? get(): Int { ^ field# } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { + public? final? [SUPER_TYPES] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { + public? final? [SUPER_TYPES] fun functionWithLazyBody(): String { ^functionWithLazyBody String(42) } @@ -451,7 +450,7 @@ FILE: classMembers.kt FILE RAW TO BODY: FILE: classMembers.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] class A : R|kotlin/Any| { + public final [BODY_RESOLVE] class A : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=A] constructor(): R|A| { super() } diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/delegates.txt b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/delegates.txt index 9a0a60fe199..ac29d961519 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/delegates.txt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/delegates.txt @@ -1,4 +1,3 @@ - RAW_FIR: FILE: delegates.kt public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { @@ -97,7 +96,7 @@ FILE: delegates.kt SUPER_TYPES: FILE: delegates.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { + public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(valueWithExplicitType#) receive#(valueWithImplicitType#) variableWithExplicitType# = IntegerLiteral(10) @@ -145,7 +144,7 @@ FILE: delegates.kt TYPES: FILE: delegates.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(valueWithExplicitType#) receive#(valueWithImplicitType#) variableWithExplicitType# = IntegerLiteral(10) @@ -193,7 +192,7 @@ FILE: delegates.kt STATUS: FILE: delegates.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun resolveMe(): R|kotlin/Unit| { + public final [STATUS] fun resolveMe(): R|kotlin/Unit| { receive#(valueWithExplicitType#) receive#(valueWithImplicitType#) variableWithExplicitType# = IntegerLiteral(10) @@ -241,7 +240,7 @@ FILE: delegates.kt CONTRACTS: FILE: delegates.kt - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] fun resolveMe(): R|kotlin/Unit| { + public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { receive#(valueWithExplicitType#) receive#(valueWithImplicitType#) variableWithExplicitType# = IntegerLiteral(10) @@ -289,7 +288,7 @@ FILE: delegates.kt IMPLICIT_TYPES_BODY_RESOLVE: FILE: delegates.kt - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { receive#(valueWithExplicitType#) receive#(valueWithImplicitType#) variableWithExplicitType# = IntegerLiteral(10) @@ -337,49 +336,49 @@ FILE: delegates.kt BODY_RESOLVE: FILE: delegates.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/valueWithExplicitType|) R|/receive|(R|/valueWithImplicitType|) R|/variableWithExplicitType| = Int(10) R|/variableWithImplicitType| = Int(10) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|kotlin/Int|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=STATUS] val delegate: R|kotlin/properties/ReadWriteProperty| = object : R|kotlin/properties/ReadWriteProperty| { - private [BODY_RESOLVE] [ContainingClassKey=] constructor(): R|| { + public final [STATUS] val delegate: R|kotlin/properties/ReadWriteProperty| = object : R|kotlin/properties/ReadWriteProperty| { + private [RAW_FIR] [ContainingClassKey=] constructor(): R|| { super() } - public final override operator [BODY_RESOLVE] fun getValue([BODY_RESOLVE] thisRef: R|kotlin/Any?|, [BODY_RESOLVE] property: R|kotlin/reflect/KProperty<*>|): R|kotlin/Int| { + public final override operator [RAW_FIR] fun getValue([RAW_FIR] thisRef: R|kotlin/Any?|, [RAW_FIR] property: R|kotlin/reflect/KProperty<*>|): R|kotlin/Int| { ^getValue Int(1) } - public final override operator [BODY_RESOLVE] fun setValue([BODY_RESOLVE] thisRef: R|kotlin/Any?|, [BODY_RESOLVE] property: R|kotlin/reflect/KProperty<*>|, [BODY_RESOLVE] value: R|kotlin/Int|): R|kotlin/Unit| { + public final override operator [RAW_FIR] fun setValue([RAW_FIR] thisRef: R|kotlin/Any?|, [RAW_FIR] property: R|kotlin/reflect/KProperty<*>|, [RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { } } [BODY_RESOLVE] public get(): R|kotlin/properties/ReadWriteProperty| - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] val valueWithExplicitType: R|kotlin/Int|by delegate# + public final [STATUS] val valueWithExplicitType: R|kotlin/Int|by delegate# [STATUS] public get(): { ^ D|/valueWithExplicitType|.getValue#(Null(null), ::R|/valueWithExplicitType|) } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=STATUS] val valueWithImplicitType: R|kotlin/Int|by R|/delegate| - [BODY_RESOLVE] public get(): R|kotlin/Int| { + public final [STATUS] val valueWithImplicitType: R|kotlin/Int|by R|/delegate| + [STATUS] public get(): R|kotlin/Int| { ^ D|/valueWithImplicitType|.R|SubstitutionOverride|(Null(null), ::R|/valueWithImplicitType|) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] var variableWithExplicitType: R|kotlin/Int|by delegate# + public final [STATUS] var variableWithExplicitType: R|kotlin/Int|by delegate# [STATUS] public get(): { ^ D|/variableWithExplicitType|.getValue#(Null(null), ::R|/variableWithExplicitType|) } - [STATUS] public set([STATUS] : ): R|kotlin/Unit| { + [STATUS] public set([RAW_FIR] : ): R|kotlin/Unit| { D|/variableWithExplicitType|.setValue#(Null(null), ::R|/variableWithExplicitType|, R|/variableWithExplicitType|) } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=STATUS] var variableWithImplicitType: R|kotlin/Int|by R|/delegate| - [BODY_RESOLVE] public get(): R|kotlin/Int| { + public final [STATUS] var variableWithImplicitType: R|kotlin/Int|by R|/delegate| + [STATUS] public get(): R|kotlin/Int| { ^ D|/variableWithImplicitType|.R|SubstitutionOverride|(Null(null), ::R|/variableWithImplicitType|) } - [BODY_RESOLVE] public set([BODY_RESOLVE] : R|kotlin/Int|): R|kotlin/Unit| { + [STATUS] public set([RAW_FIR] : R|kotlin/Int|): R|kotlin/Unit| { D|/variableWithImplicitType|.R|SubstitutionOverride|(Null(null), ::R|/variableWithImplicitType|, R|/variableWithImplicitType|) } @@ -433,97 +432,97 @@ FILE: delegates.kt BodyResolveWithChildren: FILE: delegates.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/valueWithExplicitType|) R|/receive|(R|/valueWithImplicitType|) R|/variableWithExplicitType| = Int(10) R|/variableWithImplicitType| = Int(10) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|kotlin/Int|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=STATUS] val delegate: R|kotlin/properties/ReadWriteProperty| = object : R|kotlin/properties/ReadWriteProperty| { - private [BODY_RESOLVE] [ContainingClassKey=] constructor(): R|| { + public final [STATUS] val delegate: R|kotlin/properties/ReadWriteProperty| = object : R|kotlin/properties/ReadWriteProperty| { + private [RAW_FIR] [ContainingClassKey=] constructor(): R|| { super() } - public final override operator [BODY_RESOLVE] fun getValue([BODY_RESOLVE] thisRef: R|kotlin/Any?|, [BODY_RESOLVE] property: R|kotlin/reflect/KProperty<*>|): R|kotlin/Int| { + public final override operator [RAW_FIR] fun getValue([RAW_FIR] thisRef: R|kotlin/Any?|, [RAW_FIR] property: R|kotlin/reflect/KProperty<*>|): R|kotlin/Int| { ^getValue Int(1) } - public final override operator [BODY_RESOLVE] fun setValue([BODY_RESOLVE] thisRef: R|kotlin/Any?|, [BODY_RESOLVE] property: R|kotlin/reflect/KProperty<*>|, [BODY_RESOLVE] value: R|kotlin/Int|): R|kotlin/Unit| { + public final override operator [RAW_FIR] fun setValue([RAW_FIR] thisRef: R|kotlin/Any?|, [RAW_FIR] property: R|kotlin/reflect/KProperty<*>|, [RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { } } [BODY_RESOLVE] public get(): R|kotlin/properties/ReadWriteProperty| - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] val valueWithExplicitType: R|kotlin/Int|by delegate# + public final [STATUS] val valueWithExplicitType: R|kotlin/Int|by delegate# [STATUS] public get(): { ^ D|/valueWithExplicitType|.getValue#(Null(null), ::R|/valueWithExplicitType|) } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=STATUS] val valueWithImplicitType: R|kotlin/Int|by R|/delegate| - [BODY_RESOLVE] public get(): R|kotlin/Int| { + public final [STATUS] val valueWithImplicitType: R|kotlin/Int|by R|/delegate| + [STATUS] public get(): R|kotlin/Int| { ^ D|/valueWithImplicitType|.R|SubstitutionOverride|(Null(null), ::R|/valueWithImplicitType|) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] var variableWithExplicitType: R|kotlin/Int|by delegate# + public final [STATUS] var variableWithExplicitType: R|kotlin/Int|by delegate# [STATUS] public get(): { ^ D|/variableWithExplicitType|.getValue#(Null(null), ::R|/variableWithExplicitType|) } - [STATUS] public set([STATUS] : ): R|kotlin/Unit| { + [STATUS] public set([RAW_FIR] : ): R|kotlin/Unit| { D|/variableWithExplicitType|.setValue#(Null(null), ::R|/variableWithExplicitType|, R|/variableWithExplicitType|) } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=STATUS] var variableWithImplicitType: R|kotlin/Int|by R|/delegate| - [BODY_RESOLVE] public get(): R|kotlin/Int| { + public final [STATUS] var variableWithImplicitType: R|kotlin/Int|by R|/delegate| + [STATUS] public get(): R|kotlin/Int| { ^ D|/variableWithImplicitType|.R|SubstitutionOverride|(Null(null), ::R|/variableWithImplicitType|) } - [BODY_RESOLVE] public set([BODY_RESOLVE] : R|kotlin/Int|): R|kotlin/Unit| { + [STATUS] public set([RAW_FIR] : R|kotlin/Int|): R|kotlin/Unit| { D|/variableWithImplicitType|.R|SubstitutionOverride|(Null(null), ::R|/variableWithImplicitType|, R|/variableWithImplicitType|) } CallableBodyResolve: FILE: delegates.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/valueWithExplicitType|) R|/receive|(R|/valueWithImplicitType|) R|/variableWithExplicitType| = Int(10) R|/variableWithImplicitType| = Int(10) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|kotlin/Int|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=STATUS] val delegate: R|kotlin/properties/ReadWriteProperty| = object : R|kotlin/properties/ReadWriteProperty| { - private [BODY_RESOLVE] [ContainingClassKey=] constructor(): R|| { + public final [STATUS] val delegate: R|kotlin/properties/ReadWriteProperty| = object : R|kotlin/properties/ReadWriteProperty| { + private [RAW_FIR] [ContainingClassKey=] constructor(): R|| { super() } - public final override operator [BODY_RESOLVE] fun getValue([BODY_RESOLVE] thisRef: R|kotlin/Any?|, [BODY_RESOLVE] property: R|kotlin/reflect/KProperty<*>|): R|kotlin/Int| { + public final override operator [RAW_FIR] fun getValue([RAW_FIR] thisRef: R|kotlin/Any?|, [RAW_FIR] property: R|kotlin/reflect/KProperty<*>|): R|kotlin/Int| { ^getValue Int(1) } - public final override operator [BODY_RESOLVE] fun setValue([BODY_RESOLVE] thisRef: R|kotlin/Any?|, [BODY_RESOLVE] property: R|kotlin/reflect/KProperty<*>|, [BODY_RESOLVE] value: R|kotlin/Int|): R|kotlin/Unit| { + public final override operator [RAW_FIR] fun setValue([RAW_FIR] thisRef: R|kotlin/Any?|, [RAW_FIR] property: R|kotlin/reflect/KProperty<*>|, [RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { } } [BODY_RESOLVE] public get(): R|kotlin/properties/ReadWriteProperty| - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] val valueWithExplicitType: R|kotlin/Int|by delegate# + public final [STATUS] val valueWithExplicitType: R|kotlin/Int|by delegate# [STATUS] public get(): { ^ D|/valueWithExplicitType|.getValue#(Null(null), ::R|/valueWithExplicitType|) } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=STATUS] val valueWithImplicitType: R|kotlin/Int|by R|/delegate| - [BODY_RESOLVE] public get(): R|kotlin/Int| { + public final [STATUS] val valueWithImplicitType: R|kotlin/Int|by R|/delegate| + [STATUS] public get(): R|kotlin/Int| { ^ D|/valueWithImplicitType|.R|SubstitutionOverride|(Null(null), ::R|/valueWithImplicitType|) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] var variableWithExplicitType: R|kotlin/Int|by delegate# + public final [STATUS] var variableWithExplicitType: R|kotlin/Int|by delegate# [STATUS] public get(): { ^ D|/variableWithExplicitType|.getValue#(Null(null), ::R|/variableWithExplicitType|) } - [STATUS] public set([STATUS] : ): R|kotlin/Unit| { + [STATUS] public set([RAW_FIR] : ): R|kotlin/Unit| { D|/variableWithExplicitType|.setValue#(Null(null), ::R|/variableWithExplicitType|, R|/variableWithExplicitType|) } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=STATUS] var variableWithImplicitType: R|kotlin/Int|by R|/delegate| - [BODY_RESOLVE] public get(): R|kotlin/Int| { + public final [STATUS] var variableWithImplicitType: R|kotlin/Int|by R|/delegate| + [STATUS] public get(): R|kotlin/Int| { ^ D|/variableWithImplicitType|.R|SubstitutionOverride|(Null(null), ::R|/variableWithImplicitType|) } - [BODY_RESOLVE] public set([BODY_RESOLVE] : R|kotlin/Int|): R|kotlin/Unit| { + [STATUS] public set([RAW_FIR] : R|kotlin/Int|): R|kotlin/Unit| { D|/variableWithImplicitType|.R|SubstitutionOverride|(Null(null), ::R|/variableWithImplicitType|, R|/variableWithImplicitType|) } @@ -577,7 +576,7 @@ FILE: delegates.kt AnnotationType: FILE: delegates.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(valueWithExplicitType#) receive#(valueWithImplicitType#) variableWithExplicitType# = IntegerLiteral(10) @@ -625,55 +624,55 @@ FILE: delegates.kt AnnotationsArguments: FILE: delegates.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/valueWithExplicitType|) R|/receive|(R|/valueWithImplicitType|) R|/variableWithExplicitType| = Int(10) R|/variableWithImplicitType| = Int(10) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|kotlin/Int|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=STATUS] val delegate: R|kotlin/properties/ReadWriteProperty| = object : R|kotlin/properties/ReadWriteProperty| { - private [BODY_RESOLVE] [ContainingClassKey=] constructor(): R|| { + public final [STATUS] val delegate: R|kotlin/properties/ReadWriteProperty| = object : R|kotlin/properties/ReadWriteProperty| { + private [RAW_FIR] [ContainingClassKey=] constructor(): R|| { super() } - public final override operator [BODY_RESOLVE] fun getValue([BODY_RESOLVE] thisRef: R|kotlin/Any?|, [BODY_RESOLVE] property: R|kotlin/reflect/KProperty<*>|): R|kotlin/Int| { + public final override operator [RAW_FIR] fun getValue([RAW_FIR] thisRef: R|kotlin/Any?|, [RAW_FIR] property: R|kotlin/reflect/KProperty<*>|): R|kotlin/Int| { ^getValue Int(1) } - public final override operator [BODY_RESOLVE] fun setValue([BODY_RESOLVE] thisRef: R|kotlin/Any?|, [BODY_RESOLVE] property: R|kotlin/reflect/KProperty<*>|, [BODY_RESOLVE] value: R|kotlin/Int|): R|kotlin/Unit| { + public final override operator [RAW_FIR] fun setValue([RAW_FIR] thisRef: R|kotlin/Any?|, [RAW_FIR] property: R|kotlin/reflect/KProperty<*>|, [RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { } } [BODY_RESOLVE] public get(): R|kotlin/properties/ReadWriteProperty| - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] val valueWithExplicitType: R|kotlin/Int|by delegate# + public final [STATUS] val valueWithExplicitType: R|kotlin/Int|by delegate# [STATUS] public get(): { ^ D|/valueWithExplicitType|.getValue#(Null(null), ::R|/valueWithExplicitType|) } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=STATUS] val valueWithImplicitType: R|kotlin/Int|by R|/delegate| - [BODY_RESOLVE] public get(): R|kotlin/Int| { + public final [STATUS] val valueWithImplicitType: R|kotlin/Int|by R|/delegate| + [STATUS] public get(): R|kotlin/Int| { ^ D|/valueWithImplicitType|.R|SubstitutionOverride|(Null(null), ::R|/valueWithImplicitType|) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] var variableWithExplicitType: R|kotlin/Int|by delegate# + public final [STATUS] var variableWithExplicitType: R|kotlin/Int|by delegate# [STATUS] public get(): { ^ D|/variableWithExplicitType|.getValue#(Null(null), ::R|/variableWithExplicitType|) } - [STATUS] public set([STATUS] : ): R|kotlin/Unit| { + [STATUS] public set([RAW_FIR] : ): R|kotlin/Unit| { D|/variableWithExplicitType|.setValue#(Null(null), ::R|/variableWithExplicitType|, R|/variableWithExplicitType|) } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=STATUS] var variableWithImplicitType: R|kotlin/Int|by R|/delegate| - [BODY_RESOLVE] public get(): R|kotlin/Int| { + public final [STATUS] var variableWithImplicitType: R|kotlin/Int|by R|/delegate| + [STATUS] public get(): R|kotlin/Int| { ^ D|/variableWithImplicitType|.R|SubstitutionOverride|(Null(null), ::R|/variableWithImplicitType|) } - [BODY_RESOLVE] public set([BODY_RESOLVE] : R|kotlin/Int|): R|kotlin/Unit| { + [STATUS] public set([RAW_FIR] : R|kotlin/Int|): R|kotlin/Unit| { D|/variableWithImplicitType|.R|SubstitutionOverride|(Null(null), ::R|/variableWithImplicitType|, R|/variableWithImplicitType|) } CallableContracts: FILE: delegates.kt - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] fun resolveMe(): R|kotlin/Unit| { + public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { receive#(valueWithExplicitType#) receive#(valueWithImplicitType#) variableWithExplicitType# = IntegerLiteral(10) @@ -721,7 +720,7 @@ FILE: delegates.kt DeclarationStatus: FILE: delegates.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun resolveMe(): R|kotlin/Unit| { + public final [STATUS] fun resolveMe(): R|kotlin/Unit| { receive#(valueWithExplicitType#) receive#(valueWithImplicitType#) variableWithExplicitType# = IntegerLiteral(10) @@ -769,7 +768,7 @@ FILE: delegates.kt ValueParametersTypes: FILE: delegates.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(valueWithExplicitType#) receive#(valueWithImplicitType#) variableWithExplicitType# = IntegerLiteral(10) @@ -817,7 +816,7 @@ FILE: delegates.kt TypeParametersTypes: FILE: delegates.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(valueWithExplicitType#) receive#(valueWithImplicitType#) variableWithExplicitType# = IntegerLiteral(10) @@ -865,15 +864,15 @@ FILE: delegates.kt FILE RAW TO BODY: FILE: delegates.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/valueWithExplicitType|) R|/receive|(R|/valueWithImplicitType|) R|/variableWithExplicitType| = Int(10) R|/variableWithImplicitType| = Int(10) } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun receive([BODY_RESOLVE] value: R|kotlin/Int|): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun receive([BODY_RESOLVE] value: R|kotlin/Int|): R|kotlin/Unit| { } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] val delegate: R|kotlin/properties/ReadWriteProperty| = object : R|kotlin/properties/ReadWriteProperty| { + public final [BODY_RESOLVE] val delegate: R|kotlin/properties/ReadWriteProperty| = object : R|kotlin/properties/ReadWriteProperty| { private [BODY_RESOLVE] [ContainingClassKey=] constructor(): R|| { super() } @@ -888,22 +887,22 @@ FILE: delegates.kt } [BODY_RESOLVE] public get(): R|kotlin/properties/ReadWriteProperty| - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] val valueWithExplicitType: R|kotlin/Int|by R|/delegate| + public final [BODY_RESOLVE] val valueWithExplicitType: R|kotlin/Int|by R|/delegate| [BODY_RESOLVE] public get(): R|kotlin/Int| { ^ D|/valueWithExplicitType|.R|SubstitutionOverride|(Null(null), ::R|/valueWithExplicitType|) } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] val valueWithImplicitType: R|kotlin/Int|by R|/delegate| + public final [BODY_RESOLVE] val valueWithImplicitType: R|kotlin/Int|by R|/delegate| [BODY_RESOLVE] public get(): R|kotlin/Int| { ^ D|/valueWithImplicitType|.R|SubstitutionOverride|(Null(null), ::R|/valueWithImplicitType|) } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] var variableWithExplicitType: R|kotlin/Int|by R|/delegate| + public final [BODY_RESOLVE] var variableWithExplicitType: R|kotlin/Int|by R|/delegate| [BODY_RESOLVE] public get(): R|kotlin/Int| { ^ D|/variableWithExplicitType|.R|SubstitutionOverride|(Null(null), ::R|/variableWithExplicitType|) } [BODY_RESOLVE] public set([BODY_RESOLVE] : R|kotlin/Int|): R|kotlin/Unit| { D|/variableWithExplicitType|.R|SubstitutionOverride|(Null(null), ::R|/variableWithExplicitType|, R|/variableWithExplicitType|) } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] var variableWithImplicitType: R|kotlin/Int|by R|/delegate| + public final [BODY_RESOLVE] var variableWithImplicitType: R|kotlin/Int|by R|/delegate| [BODY_RESOLVE] public get(): R|kotlin/Int| { ^ D|/variableWithImplicitType|.R|SubstitutionOverride|(Null(null), ::R|/variableWithImplicitType|) } diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/functionWithParameter.kt b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/functionWithParameter.kt new file mode 100644 index 00000000000..969eb0f5ea9 --- /dev/null +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/functionWithParameter.kt @@ -0,0 +1,3 @@ +interface I + +fun resolveMe(param: I) = Unit \ No newline at end of file diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/functionWithParameter.txt b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/functionWithParameter.txt new file mode 100644 index 00000000000..402a0920e91 --- /dev/null +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/functionWithParameter.txt @@ -0,0 +1,151 @@ +RAW_FIR: +FILE: functionWithParameter.kt + public? final? [RAW_FIR] interface I : R|kotlin/Any| { + } + public? final? [RAW_FIR] fun resolveMe([RAW_FIR] param: I): { + ^resolveMe Unit# + } + +IMPORTS: +FILE: functionWithParameter.kt + public? final? [RAW_FIR] interface I : R|kotlin/Any| { + } + public? final? [RAW_FIR] fun resolveMe([RAW_FIR] param: I): { + ^resolveMe Unit# + } + +SUPER_TYPES: +FILE: functionWithParameter.kt + public? final? [RAW_FIR] interface I : R|kotlin/Any| { + } + public? final? [SUPER_TYPES] fun resolveMe([RAW_FIR] param: I): { + ^resolveMe Unit# + } + +TYPES: +FILE: functionWithParameter.kt + public? final? [RAW_FIR] interface I : R|kotlin/Any| { + } + public? final? [TYPES] fun resolveMe([RAW_FIR] param: R|I|): { + ^resolveMe Unit# + } + +STATUS: +FILE: functionWithParameter.kt + public? final? [RAW_FIR] interface I : R|kotlin/Any| { + } + public final [STATUS] fun resolveMe([RAW_FIR] param: R|I|): { + ^resolveMe Unit# + } + +CONTRACTS: +FILE: functionWithParameter.kt + public? final? [RAW_FIR] interface I : R|kotlin/Any| { + } + public final [CONTRACTS] fun resolveMe([RAW_FIR] param: R|I|): { + ^resolveMe Unit# + } + +IMPLICIT_TYPES_BODY_RESOLVE: +FILE: functionWithParameter.kt + public? final? [RAW_FIR] interface I : R|kotlin/Any| { + } + public final [IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe([RAW_FIR] param: R|I|): R|kotlin/Unit| { + ^resolveMe Q|kotlin/Unit| + } + +BODY_RESOLVE: +FILE: functionWithParameter.kt + public? final? [RAW_FIR] interface I : R|kotlin/Any| { + } + public final [BODY_RESOLVE] fun resolveMe([BODY_RESOLVE] param: R|I|): R|kotlin/Unit| { + ^resolveMe Q|kotlin/Unit| + } + +NoResolve: +FILE: functionWithParameter.kt + public? final? [RAW_FIR] interface I : R|kotlin/Any| { + } + public? final? [RAW_FIR] fun resolveMe([RAW_FIR] param: I): { + ^resolveMe Unit# + } + +BodyResolveWithChildren: +FILE: functionWithParameter.kt + public? final? [RAW_FIR] interface I : R|kotlin/Any| { + } + public final [BODY_RESOLVE] fun resolveMe([BODY_RESOLVE] param: R|I|): R|kotlin/Unit| { + ^resolveMe Q|kotlin/Unit| + } + +CallableBodyResolve: +FILE: functionWithParameter.kt + public? final? [RAW_FIR] interface I : R|kotlin/Any| { + } + public final [BODY_RESOLVE] fun resolveMe([BODY_RESOLVE] param: R|I|): R|kotlin/Unit| { + ^resolveMe Q|kotlin/Unit| + } + +CallableReturnType: +FILE: functionWithParameter.kt + public? final? [RAW_FIR] interface I : R|kotlin/Any| { + } + public final [IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe([RAW_FIR] param: R|I|): R|kotlin/Unit| { + ^resolveMe Q|kotlin/Unit| + } + +AnnotationType: +FILE: functionWithParameter.kt + public? final? [RAW_FIR] interface I : R|kotlin/Any| { + } + public? final? [TYPES] fun resolveMe([RAW_FIR] param: R|I|): { + ^resolveMe Unit# + } + +AnnotationsArguments: +FILE: functionWithParameter.kt + public? final? [RAW_FIR] interface I : R|kotlin/Any| { + } + public final [BODY_RESOLVE] fun resolveMe([BODY_RESOLVE] param: R|I|): R|kotlin/Unit| { + ^resolveMe Q|kotlin/Unit| + } + +CallableContracts: +FILE: functionWithParameter.kt + public? final? [RAW_FIR] interface I : R|kotlin/Any| { + } + public final [CONTRACTS] fun resolveMe([RAW_FIR] param: R|I|): { + ^resolveMe Unit# + } + +DeclarationStatus: +FILE: functionWithParameter.kt + public? final? [RAW_FIR] interface I : R|kotlin/Any| { + } + public final [STATUS] fun resolveMe([RAW_FIR] param: R|I|): { + ^resolveMe Unit# + } + +ValueParametersTypes: +FILE: functionWithParameter.kt + public? final? [RAW_FIR] interface I : R|kotlin/Any| { + } + public? final? [TYPES] fun resolveMe([RAW_FIR] param: R|I|): { + ^resolveMe Unit# + } + +TypeParametersTypes: +FILE: functionWithParameter.kt + public? final? [RAW_FIR] interface I : R|kotlin/Any| { + } + public? final? [TYPES] fun resolveMe([RAW_FIR] param: R|I|): { + ^resolveMe Unit# + } + +FILE RAW TO BODY: +FILE: functionWithParameter.kt + public abstract [BODY_RESOLVE] interface I : R|kotlin/Any| { + } + public final [BODY_RESOLVE] fun resolveMe([BODY_RESOLVE] param: R|I|): R|kotlin/Unit| { + ^resolveMe Q|kotlin/Unit| + } diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/localDeclaration.txt b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/localDeclaration.txt index fc179b7c66d..3f47ed35d2a 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/localDeclaration.txt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/localDeclaration.txt @@ -22,12 +22,12 @@ FILE: localDeclaration.kt IMPORTS: FILE: localDeclaration.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun x(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun x(): R|kotlin/Unit| { local final [BODY_RESOLVE] [ContainingClassKey=A] class resolveMe : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=resolveMe] constructor(): R|A.resolveMe| { super() @@ -44,12 +44,12 @@ FILE: localDeclaration.kt SUPER_TYPES: FILE: localDeclaration.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun x(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun x(): R|kotlin/Unit| { local final [BODY_RESOLVE] [ContainingClassKey=A] class resolveMe : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=resolveMe] constructor(): R|A.resolveMe| { super() @@ -66,12 +66,12 @@ FILE: localDeclaration.kt TYPES: FILE: localDeclaration.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun x(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun x(): R|kotlin/Unit| { local final [BODY_RESOLVE] [ContainingClassKey=A] class resolveMe : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=resolveMe] constructor(): R|A.resolveMe| { super() @@ -88,12 +88,12 @@ FILE: localDeclaration.kt STATUS: FILE: localDeclaration.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun x(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun x(): R|kotlin/Unit| { local final [BODY_RESOLVE] [ContainingClassKey=A] class resolveMe : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=resolveMe] constructor(): R|A.resolveMe| { super() @@ -110,12 +110,12 @@ FILE: localDeclaration.kt CONTRACTS: FILE: localDeclaration.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun x(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun x(): R|kotlin/Unit| { local final [BODY_RESOLVE] [ContainingClassKey=A] class resolveMe : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=resolveMe] constructor(): R|A.resolveMe| { super() @@ -132,12 +132,12 @@ FILE: localDeclaration.kt IMPLICIT_TYPES_BODY_RESOLVE: FILE: localDeclaration.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun x(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun x(): R|kotlin/Unit| { local final [BODY_RESOLVE] [ContainingClassKey=A] class resolveMe : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=resolveMe] constructor(): R|A.resolveMe| { super() @@ -154,12 +154,12 @@ FILE: localDeclaration.kt BODY_RESOLVE: FILE: localDeclaration.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun x(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun x(): R|kotlin/Unit| { local final [BODY_RESOLVE] [ContainingClassKey=A] class resolveMe : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=resolveMe] constructor(): R|A.resolveMe| { super() @@ -198,12 +198,12 @@ FILE: localDeclaration.kt BodyResolveWithChildren: FILE: localDeclaration.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun x(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun x(): R|kotlin/Unit| { local final [BODY_RESOLVE] [ContainingClassKey=A] class resolveMe : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=resolveMe] constructor(): R|A.resolveMe| { super() @@ -220,12 +220,12 @@ FILE: localDeclaration.kt AnnotationType: FILE: localDeclaration.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun x(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun x(): R|kotlin/Unit| { local final [BODY_RESOLVE] [ContainingClassKey=A] class resolveMe : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=resolveMe] constructor(): R|A.resolveMe| { super() @@ -242,12 +242,12 @@ FILE: localDeclaration.kt AnnotationsArguments: FILE: localDeclaration.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun x(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun x(): R|kotlin/Unit| { local final [BODY_RESOLVE] [ContainingClassKey=A] class resolveMe : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=resolveMe] constructor(): R|A.resolveMe| { super() @@ -264,12 +264,12 @@ FILE: localDeclaration.kt ClassSuperTypes: FILE: localDeclaration.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun x(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun x(): R|kotlin/Unit| { local final [BODY_RESOLVE] [ContainingClassKey=A] class resolveMe : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=resolveMe] constructor(): R|A.resolveMe| { super() @@ -286,12 +286,12 @@ FILE: localDeclaration.kt DeclarationStatus: FILE: localDeclaration.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun x(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun x(): R|kotlin/Unit| { local final [BODY_RESOLVE] [ContainingClassKey=A] class resolveMe : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=resolveMe] constructor(): R|A.resolveMe| { super() @@ -308,12 +308,12 @@ FILE: localDeclaration.kt ValueParametersTypes: FILE: localDeclaration.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun x(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun x(): R|kotlin/Unit| { local final [BODY_RESOLVE] [ContainingClassKey=A] class resolveMe : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=resolveMe] constructor(): R|A.resolveMe| { super() @@ -330,12 +330,12 @@ FILE: localDeclaration.kt TypeParametersTypes: FILE: localDeclaration.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun x(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun x(): R|kotlin/Unit| { local final [BODY_RESOLVE] [ContainingClassKey=A] class resolveMe : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=resolveMe] constructor(): R|A.resolveMe| { super() @@ -352,7 +352,7 @@ FILE: localDeclaration.kt FILE RAW TO BODY: FILE: localDeclaration.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] class A : R|kotlin/Any| { + public final [BODY_RESOLVE] class A : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=A] constructor(): R|A| { super() } diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/localFunction.txt b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/localFunction.txt index 4eea5c585cf..b78de97e284 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/localFunction.txt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/localFunction.txt @@ -15,12 +15,12 @@ FILE: localFunction.kt IMPORTS: FILE: localFunction.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun x(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun x(): R|kotlin/Unit| { local final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { } @@ -30,12 +30,12 @@ FILE: localFunction.kt SUPER_TYPES: FILE: localFunction.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun x(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun x(): R|kotlin/Unit| { local final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { } @@ -45,12 +45,12 @@ FILE: localFunction.kt TYPES: FILE: localFunction.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun x(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun x(): R|kotlin/Unit| { local final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { } @@ -60,12 +60,12 @@ FILE: localFunction.kt STATUS: FILE: localFunction.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun x(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun x(): R|kotlin/Unit| { local final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { } @@ -75,12 +75,12 @@ FILE: localFunction.kt CONTRACTS: FILE: localFunction.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun x(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun x(): R|kotlin/Unit| { local final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { } @@ -90,12 +90,12 @@ FILE: localFunction.kt IMPLICIT_TYPES_BODY_RESOLVE: FILE: localFunction.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun x(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun x(): R|kotlin/Unit| { local final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { } @@ -105,12 +105,12 @@ FILE: localFunction.kt BODY_RESOLVE: FILE: localFunction.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun x(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun x(): R|kotlin/Unit| { local final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { } @@ -135,12 +135,12 @@ FILE: localFunction.kt BodyResolveWithChildren: FILE: localFunction.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun x(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun x(): R|kotlin/Unit| { local final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { } @@ -150,12 +150,12 @@ FILE: localFunction.kt CallableBodyResolve: FILE: localFunction.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun x(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun x(): R|kotlin/Unit| { local final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { } @@ -180,12 +180,12 @@ FILE: localFunction.kt AnnotationType: FILE: localFunction.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun x(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun x(): R|kotlin/Unit| { local final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { } @@ -195,12 +195,12 @@ FILE: localFunction.kt AnnotationsArguments: FILE: localFunction.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun x(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun x(): R|kotlin/Unit| { local final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { } @@ -210,12 +210,12 @@ FILE: localFunction.kt CallableContracts: FILE: localFunction.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun x(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun x(): R|kotlin/Unit| { local final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { } @@ -225,12 +225,12 @@ FILE: localFunction.kt DeclarationStatus: FILE: localFunction.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun x(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun x(): R|kotlin/Unit| { local final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { } @@ -240,12 +240,12 @@ FILE: localFunction.kt ValueParametersTypes: FILE: localFunction.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun x(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun x(): R|kotlin/Unit| { local final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { } @@ -255,12 +255,12 @@ FILE: localFunction.kt TypeParametersTypes: FILE: localFunction.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun x(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun x(): R|kotlin/Unit| { local final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { } @@ -270,7 +270,7 @@ FILE: localFunction.kt FILE RAW TO BODY: FILE: localFunction.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] class A : R|kotlin/Any| { + public final [BODY_RESOLVE] class A : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=A] constructor(): R|A| { super() } diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/parameterOfLocalSetter.txt b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/parameterOfLocalSetter.txt index a898c8eff36..826d435a0c5 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/parameterOfLocalSetter.txt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/parameterOfLocalSetter.txt @@ -18,7 +18,7 @@ FILE: parameterOfLocalSetter.kt IMPORTS: FILE: parameterOfLocalSetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] class XX : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=XX] constructor(): R|XX| { super() @@ -36,7 +36,7 @@ FILE: parameterOfLocalSetter.kt SUPER_TYPES: FILE: parameterOfLocalSetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] class XX : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=XX] constructor(): R|XX| { super() @@ -54,7 +54,7 @@ FILE: parameterOfLocalSetter.kt TYPES: FILE: parameterOfLocalSetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] class XX : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=XX] constructor(): R|XX| { super() @@ -72,7 +72,7 @@ FILE: parameterOfLocalSetter.kt STATUS: FILE: parameterOfLocalSetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] class XX : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=XX] constructor(): R|XX| { super() @@ -90,7 +90,7 @@ FILE: parameterOfLocalSetter.kt CONTRACTS: FILE: parameterOfLocalSetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] class XX : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=XX] constructor(): R|XX| { super() @@ -108,7 +108,7 @@ FILE: parameterOfLocalSetter.kt IMPLICIT_TYPES_BODY_RESOLVE: FILE: parameterOfLocalSetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] class XX : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=XX] constructor(): R|XX| { super() @@ -126,7 +126,7 @@ FILE: parameterOfLocalSetter.kt BODY_RESOLVE: FILE: parameterOfLocalSetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] class XX : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=XX] constructor(): R|XX| { super() @@ -162,7 +162,7 @@ FILE: parameterOfLocalSetter.kt BodyResolveWithChildren: FILE: parameterOfLocalSetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] class XX : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=XX] constructor(): R|XX| { super() @@ -180,7 +180,7 @@ FILE: parameterOfLocalSetter.kt CallableBodyResolve: FILE: parameterOfLocalSetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] class XX : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=XX] constructor(): R|XX| { super() @@ -198,7 +198,7 @@ FILE: parameterOfLocalSetter.kt CallableReturnType: FILE: parameterOfLocalSetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] class XX : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=XX] constructor(): R|XX| { super() @@ -216,7 +216,7 @@ FILE: parameterOfLocalSetter.kt AnnotationType: FILE: parameterOfLocalSetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] class XX : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=XX] constructor(): R|XX| { super() @@ -234,7 +234,7 @@ FILE: parameterOfLocalSetter.kt AnnotationsArguments: FILE: parameterOfLocalSetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] class XX : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=XX] constructor(): R|XX| { super() @@ -252,7 +252,7 @@ FILE: parameterOfLocalSetter.kt CallableContracts: FILE: parameterOfLocalSetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] class XX : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=XX] constructor(): R|XX| { super() @@ -270,7 +270,7 @@ FILE: parameterOfLocalSetter.kt DeclarationStatus: FILE: parameterOfLocalSetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] class XX : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=XX] constructor(): R|XX| { super() @@ -288,7 +288,7 @@ FILE: parameterOfLocalSetter.kt ValueParametersTypes: FILE: parameterOfLocalSetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] class XX : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=XX] constructor(): R|XX| { super() @@ -306,7 +306,7 @@ FILE: parameterOfLocalSetter.kt TypeParametersTypes: FILE: parameterOfLocalSetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] class XX : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=XX] constructor(): R|XX| { super() @@ -324,7 +324,7 @@ FILE: parameterOfLocalSetter.kt FILE RAW TO BODY: FILE: parameterOfLocalSetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] class XX : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=XX] constructor(): R|XX| { super() diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/parameterOfNonLocalSetter.txt b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/parameterOfNonLocalSetter.txt index 2238070e5f4..4636f662f3d 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/parameterOfNonLocalSetter.txt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/parameterOfNonLocalSetter.txt @@ -30,14 +30,14 @@ FILE: parameterOfNonLocalSetter.kt SUPER_TYPES: FILE: parameterOfNonLocalSetter.kt - public? final? [SUPER_TYPES] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class X : R|kotlin/Any| { + public? final? [RAW_FIR] class X : R|kotlin/Any| { public? [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { super() } - public? final? [RAW_FIR] var x: Int = IntegerLiteral(2) + public? final? [SUPER_TYPES] var x: Int = IntegerLiteral(2) [TYPES] [ContainingClassKey=X] public? get(): Int - [RAW_FIR] [ContainingClassKey=X] public? set([RAW_FIR] resolveMe: Int): R|kotlin/Unit| { + [SUPER_TYPES] [ContainingClassKey=X] public? set([RAW_FIR] resolveMe: Int): R|kotlin/Unit| { ^ Unit# } @@ -45,14 +45,14 @@ FILE: parameterOfNonLocalSetter.kt TYPES: FILE: parameterOfNonLocalSetter.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class X : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { + public? final? [SUPER_TYPES] class X : R|kotlin/Any| { + public? [SUPER_TYPES] [ContainingClassKey=X] constructor(): R|X| { super() } - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] var x: R|kotlin/Int| = IntegerLiteral(2) + public? final? [TYPES] var x: R|kotlin/Int| = IntegerLiteral(2) [TYPES] [ContainingClassKey=X] public? get(): R|kotlin/Int| - [TYPES] [ContainingClassKey=X] public? set([TYPES] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { + [TYPES] [ContainingClassKey=X] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { ^ Unit# } @@ -60,14 +60,14 @@ FILE: parameterOfNonLocalSetter.kt STATUS: FILE: parameterOfNonLocalSetter.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class X : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { + public final [SUPER_TYPES] class X : R|kotlin/Any| { + public? [SUPER_TYPES] [ContainingClassKey=X] constructor(): R|X| { super() } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] var x: R|kotlin/Int| = IntegerLiteral(2) + public final [STATUS] var x: R|kotlin/Int| = IntegerLiteral(2) [BODY_RESOLVE] [ContainingClassKey=X] public get(): R|kotlin/Int| - [STATUS] [ContainingClassKey=X] public set([STATUS] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { + [STATUS] [ContainingClassKey=X] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { ^ Unit# } @@ -75,14 +75,14 @@ FILE: parameterOfNonLocalSetter.kt CONTRACTS: FILE: parameterOfNonLocalSetter.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class X : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { + public final [SUPER_TYPES] class X : R|kotlin/Any| { + public? [SUPER_TYPES] [ContainingClassKey=X] constructor(): R|X| { super() } - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] var x: R|kotlin/Int| = IntegerLiteral(2) + public final [CONTRACTS] var x: R|kotlin/Int| = IntegerLiteral(2) [BODY_RESOLVE] [ContainingClassKey=X] public get(): R|kotlin/Int| - [CONTRACTS] [ContainingClassKey=X] public set([STATUS] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { + [CONTRACTS] [ContainingClassKey=X] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { ^ Unit# } @@ -90,14 +90,14 @@ FILE: parameterOfNonLocalSetter.kt IMPLICIT_TYPES_BODY_RESOLVE: FILE: parameterOfNonLocalSetter.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class X : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { + public final [STATUS] class X : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=X] constructor(): R|X| { super() } - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=IMPLICIT_TYPES_BODY_RESOLVE] var x: R|kotlin/Int| = IntegerLiteral(2) + public final [IMPLICIT_TYPES_BODY_RESOLVE] var x: R|kotlin/Int| = IntegerLiteral(2) [BODY_RESOLVE] [ContainingClassKey=X] public get(): R|kotlin/Int| - [CONTRACTS] [ContainingClassKey=X] public set([STATUS] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { + [IMPLICIT_TYPES_BODY_RESOLVE] [ContainingClassKey=X] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { ^ Unit# } @@ -105,12 +105,12 @@ FILE: parameterOfNonLocalSetter.kt BODY_RESOLVE: FILE: parameterOfNonLocalSetter.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class X : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { + public final [STATUS] class X : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=X] constructor(): R|X| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] var x: R|kotlin/Int| = Int(2) + public final [BODY_RESOLVE] var x: R|kotlin/Int| = Int(2) [BODY_RESOLVE] [ContainingClassKey=X] public get(): R|kotlin/Int| [BODY_RESOLVE] [ContainingClassKey=X] public set([BODY_RESOLVE] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { ^ Q|kotlin/Unit| @@ -135,12 +135,12 @@ FILE: parameterOfNonLocalSetter.kt BodyResolveWithChildren: FILE: parameterOfNonLocalSetter.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class X : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { + public final [STATUS] class X : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=X] constructor(): R|X| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] var x: R|kotlin/Int| = Int(2) + public final [BODY_RESOLVE] var x: R|kotlin/Int| = Int(2) [BODY_RESOLVE] [ContainingClassKey=X] public get(): R|kotlin/Int| [BODY_RESOLVE] [ContainingClassKey=X] public set([BODY_RESOLVE] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { ^ Q|kotlin/Unit| @@ -150,12 +150,12 @@ FILE: parameterOfNonLocalSetter.kt CallableBodyResolve: FILE: parameterOfNonLocalSetter.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class X : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { + public final [STATUS] class X : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=X] constructor(): R|X| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] var x: R|kotlin/Int| = Int(2) + public final [BODY_RESOLVE] var x: R|kotlin/Int| = Int(2) [BODY_RESOLVE] [ContainingClassKey=X] public get(): R|kotlin/Int| [BODY_RESOLVE] [ContainingClassKey=X] public set([BODY_RESOLVE] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { ^ Q|kotlin/Unit| @@ -165,14 +165,14 @@ FILE: parameterOfNonLocalSetter.kt CallableReturnType: FILE: parameterOfNonLocalSetter.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class X : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { + public? final? [SUPER_TYPES] class X : R|kotlin/Any| { + public? [SUPER_TYPES] [ContainingClassKey=X] constructor(): R|X| { super() } - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] var x: R|kotlin/Int| = IntegerLiteral(2) + public? final? [TYPES] var x: R|kotlin/Int| = IntegerLiteral(2) [TYPES] [ContainingClassKey=X] public? get(): R|kotlin/Int| - [TYPES] [ContainingClassKey=X] public? set([TYPES] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { + [TYPES] [ContainingClassKey=X] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { ^ Unit# } @@ -180,14 +180,14 @@ FILE: parameterOfNonLocalSetter.kt AnnotationType: FILE: parameterOfNonLocalSetter.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class X : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { + public? final? [SUPER_TYPES] class X : R|kotlin/Any| { + public? [SUPER_TYPES] [ContainingClassKey=X] constructor(): R|X| { super() } - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] var x: R|kotlin/Int| = IntegerLiteral(2) + public? final? [TYPES] var x: R|kotlin/Int| = IntegerLiteral(2) [TYPES] [ContainingClassKey=X] public? get(): R|kotlin/Int| - [TYPES] [ContainingClassKey=X] public? set([TYPES] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { + [TYPES] [ContainingClassKey=X] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { ^ Unit# } @@ -195,12 +195,12 @@ FILE: parameterOfNonLocalSetter.kt AnnotationsArguments: FILE: parameterOfNonLocalSetter.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class X : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { + public final [STATUS] class X : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=X] constructor(): R|X| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] var x: R|kotlin/Int| = Int(2) + public final [BODY_RESOLVE] var x: R|kotlin/Int| = Int(2) [BODY_RESOLVE] [ContainingClassKey=X] public get(): R|kotlin/Int| [BODY_RESOLVE] [ContainingClassKey=X] public set([BODY_RESOLVE] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { ^ Q|kotlin/Unit| @@ -210,14 +210,14 @@ FILE: parameterOfNonLocalSetter.kt CallableContracts: FILE: parameterOfNonLocalSetter.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class X : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { + public final [SUPER_TYPES] class X : R|kotlin/Any| { + public? [SUPER_TYPES] [ContainingClassKey=X] constructor(): R|X| { super() } - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] var x: R|kotlin/Int| = IntegerLiteral(2) + public final [CONTRACTS] var x: R|kotlin/Int| = IntegerLiteral(2) [BODY_RESOLVE] [ContainingClassKey=X] public get(): R|kotlin/Int| - [CONTRACTS] [ContainingClassKey=X] public set([STATUS] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { + [CONTRACTS] [ContainingClassKey=X] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { ^ Unit# } @@ -225,14 +225,14 @@ FILE: parameterOfNonLocalSetter.kt DeclarationStatus: FILE: parameterOfNonLocalSetter.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class X : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { + public final [SUPER_TYPES] class X : R|kotlin/Any| { + public? [SUPER_TYPES] [ContainingClassKey=X] constructor(): R|X| { super() } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] var x: R|kotlin/Int| = IntegerLiteral(2) + public final [STATUS] var x: R|kotlin/Int| = IntegerLiteral(2) [BODY_RESOLVE] [ContainingClassKey=X] public get(): R|kotlin/Int| - [STATUS] [ContainingClassKey=X] public set([STATUS] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { + [STATUS] [ContainingClassKey=X] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { ^ Unit# } @@ -240,14 +240,14 @@ FILE: parameterOfNonLocalSetter.kt ValueParametersTypes: FILE: parameterOfNonLocalSetter.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class X : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { + public? final? [SUPER_TYPES] class X : R|kotlin/Any| { + public? [SUPER_TYPES] [ContainingClassKey=X] constructor(): R|X| { super() } - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] var x: R|kotlin/Int| = IntegerLiteral(2) + public? final? [TYPES] var x: R|kotlin/Int| = IntegerLiteral(2) [TYPES] [ContainingClassKey=X] public? get(): R|kotlin/Int| - [TYPES] [ContainingClassKey=X] public? set([TYPES] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { + [TYPES] [ContainingClassKey=X] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { ^ Unit# } @@ -255,14 +255,14 @@ FILE: parameterOfNonLocalSetter.kt TypeParametersTypes: FILE: parameterOfNonLocalSetter.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class X : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { + public? final? [SUPER_TYPES] class X : R|kotlin/Any| { + public? [SUPER_TYPES] [ContainingClassKey=X] constructor(): R|X| { super() } - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] var x: R|kotlin/Int| = IntegerLiteral(2) + public? final? [TYPES] var x: R|kotlin/Int| = IntegerLiteral(2) [TYPES] [ContainingClassKey=X] public? get(): R|kotlin/Int| - [TYPES] [ContainingClassKey=X] public? set([TYPES] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { + [TYPES] [ContainingClassKey=X] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { ^ Unit# } @@ -270,7 +270,7 @@ FILE: parameterOfNonLocalSetter.kt FILE RAW TO BODY: FILE: parameterOfNonLocalSetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] class X : R|kotlin/Any| { + public final [BODY_RESOLVE] class X : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=X] constructor(): R|X| { super() } diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/propertyWithGetter.txt b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/propertyWithGetter.txt index f93d5826fd8..db68edcc5cd 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/propertyWithGetter.txt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/propertyWithGetter.txt @@ -1,4 +1,3 @@ - RAW_FIR: FILE: propertyWithGetter.kt public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { @@ -25,7 +24,7 @@ FILE: propertyWithGetter.kt SUPER_TYPES: FILE: propertyWithGetter.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { + public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(withGetter#) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { @@ -37,7 +36,7 @@ FILE: propertyWithGetter.kt TYPES: FILE: propertyWithGetter.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(withGetter#) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { @@ -49,7 +48,7 @@ FILE: propertyWithGetter.kt STATUS: FILE: propertyWithGetter.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun resolveMe(): R|kotlin/Unit| { + public final [STATUS] fun resolveMe(): R|kotlin/Unit| { receive#(withGetter#) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { @@ -61,7 +60,7 @@ FILE: propertyWithGetter.kt CONTRACTS: FILE: propertyWithGetter.kt - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] fun resolveMe(): R|kotlin/Unit| { + public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { receive#(withGetter#) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { @@ -73,7 +72,7 @@ FILE: propertyWithGetter.kt IMPLICIT_TYPES_BODY_RESOLVE: FILE: propertyWithGetter.kt - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { receive#(withGetter#) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { @@ -85,12 +84,12 @@ FILE: propertyWithGetter.kt BODY_RESOLVE: FILE: propertyWithGetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/withGetter|) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|kotlin/Int|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] val withGetter: R|kotlin/Int| + public final [STATUS] val withGetter: R|kotlin/Int| [STATUS] public get(): R|kotlin/Int| { ^ IntegerLiteral(42) } @@ -109,24 +108,24 @@ FILE: propertyWithGetter.kt BodyResolveWithChildren: FILE: propertyWithGetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/withGetter|) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|kotlin/Int|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] val withGetter: R|kotlin/Int| + public final [STATUS] val withGetter: R|kotlin/Int| [STATUS] public get(): R|kotlin/Int| { ^ IntegerLiteral(42) } CallableBodyResolve: FILE: propertyWithGetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/withGetter|) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|kotlin/Int|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] val withGetter: R|kotlin/Int| + public final [STATUS] val withGetter: R|kotlin/Int| [STATUS] public get(): R|kotlin/Int| { ^ IntegerLiteral(42) } @@ -145,7 +144,7 @@ FILE: propertyWithGetter.kt AnnotationType: FILE: propertyWithGetter.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(withGetter#) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { @@ -157,19 +156,19 @@ FILE: propertyWithGetter.kt AnnotationsArguments: FILE: propertyWithGetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/withGetter|) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|kotlin/Int|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] val withGetter: R|kotlin/Int| + public final [STATUS] val withGetter: R|kotlin/Int| [STATUS] public get(): R|kotlin/Int| { ^ IntegerLiteral(42) } CallableContracts: FILE: propertyWithGetter.kt - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] fun resolveMe(): R|kotlin/Unit| { + public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { receive#(withGetter#) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { @@ -181,7 +180,7 @@ FILE: propertyWithGetter.kt DeclarationStatus: FILE: propertyWithGetter.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun resolveMe(): R|kotlin/Unit| { + public final [STATUS] fun resolveMe(): R|kotlin/Unit| { receive#(withGetter#) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { @@ -193,7 +192,7 @@ FILE: propertyWithGetter.kt ValueParametersTypes: FILE: propertyWithGetter.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(withGetter#) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { @@ -205,7 +204,7 @@ FILE: propertyWithGetter.kt TypeParametersTypes: FILE: propertyWithGetter.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(withGetter#) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { @@ -217,12 +216,12 @@ FILE: propertyWithGetter.kt FILE RAW TO BODY: FILE: propertyWithGetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/withGetter|) } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun receive([BODY_RESOLVE] value: R|kotlin/Int|): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun receive([BODY_RESOLVE] value: R|kotlin/Int|): R|kotlin/Unit| { } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] val withGetter: R|kotlin/Int| + public final [BODY_RESOLVE] val withGetter: R|kotlin/Int| [BODY_RESOLVE] public get(): R|kotlin/Int| { ^ Int(42) } diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/propertyWithGetterAndSetter.txt b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/propertyWithGetterAndSetter.txt index 468cbfee4de..314b065189e 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/propertyWithGetterAndSetter.txt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/propertyWithGetterAndSetter.txt @@ -1,4 +1,3 @@ - RAW_FIR: FILE: propertyWithGetterAndSetter.kt public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { @@ -33,7 +32,7 @@ FILE: propertyWithGetterAndSetter.kt SUPER_TYPES: FILE: propertyWithGetterAndSetter.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { + public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(withGetterAndSetter#) withGetterAndSetter# = IntegerLiteral(123) } @@ -49,7 +48,7 @@ FILE: propertyWithGetterAndSetter.kt TYPES: FILE: propertyWithGetterAndSetter.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(withGetterAndSetter#) withGetterAndSetter# = IntegerLiteral(123) } @@ -65,7 +64,7 @@ FILE: propertyWithGetterAndSetter.kt STATUS: FILE: propertyWithGetterAndSetter.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun resolveMe(): R|kotlin/Unit| { + public final [STATUS] fun resolveMe(): R|kotlin/Unit| { receive#(withGetterAndSetter#) withGetterAndSetter# = IntegerLiteral(123) } @@ -81,7 +80,7 @@ FILE: propertyWithGetterAndSetter.kt CONTRACTS: FILE: propertyWithGetterAndSetter.kt - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] fun resolveMe(): R|kotlin/Unit| { + public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { receive#(withGetterAndSetter#) withGetterAndSetter# = IntegerLiteral(123) } @@ -97,7 +96,7 @@ FILE: propertyWithGetterAndSetter.kt IMPLICIT_TYPES_BODY_RESOLVE: FILE: propertyWithGetterAndSetter.kt - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { receive#(withGetterAndSetter#) withGetterAndSetter# = IntegerLiteral(123) } @@ -113,17 +112,17 @@ FILE: propertyWithGetterAndSetter.kt BODY_RESOLVE: FILE: propertyWithGetterAndSetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/withGetterAndSetter|) R|/withGetterAndSetter| = Int(123) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|kotlin/Int|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] var withGetterAndSetter: R|kotlin/Int| = IntegerLiteral(42) + public final [STATUS] var withGetterAndSetter: R|kotlin/Int| = IntegerLiteral(42) [STATUS] public get(): R|kotlin/Int| { ^ field# } - [STATUS] public set([STATUS] value: R|kotlin/Int|): R|kotlin/Unit| { + [STATUS] public set([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { field# = value# } @@ -145,33 +144,33 @@ FILE: propertyWithGetterAndSetter.kt BodyResolveWithChildren: FILE: propertyWithGetterAndSetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/withGetterAndSetter|) R|/withGetterAndSetter| = Int(123) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|kotlin/Int|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] var withGetterAndSetter: R|kotlin/Int| = IntegerLiteral(42) + public final [STATUS] var withGetterAndSetter: R|kotlin/Int| = IntegerLiteral(42) [STATUS] public get(): R|kotlin/Int| { ^ field# } - [STATUS] public set([STATUS] value: R|kotlin/Int|): R|kotlin/Unit| { + [STATUS] public set([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { field# = value# } CallableBodyResolve: FILE: propertyWithGetterAndSetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/withGetterAndSetter|) R|/withGetterAndSetter| = Int(123) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|kotlin/Int|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] var withGetterAndSetter: R|kotlin/Int| = IntegerLiteral(42) + public final [STATUS] var withGetterAndSetter: R|kotlin/Int| = IntegerLiteral(42) [STATUS] public get(): R|kotlin/Int| { ^ field# } - [STATUS] public set([STATUS] value: R|kotlin/Int|): R|kotlin/Unit| { + [STATUS] public set([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { field# = value# } @@ -193,7 +192,7 @@ FILE: propertyWithGetterAndSetter.kt AnnotationType: FILE: propertyWithGetterAndSetter.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(withGetterAndSetter#) withGetterAndSetter# = IntegerLiteral(123) } @@ -209,23 +208,23 @@ FILE: propertyWithGetterAndSetter.kt AnnotationsArguments: FILE: propertyWithGetterAndSetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/withGetterAndSetter|) R|/withGetterAndSetter| = Int(123) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|kotlin/Int|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] var withGetterAndSetter: R|kotlin/Int| = IntegerLiteral(42) + public final [STATUS] var withGetterAndSetter: R|kotlin/Int| = IntegerLiteral(42) [STATUS] public get(): R|kotlin/Int| { ^ field# } - [STATUS] public set([STATUS] value: R|kotlin/Int|): R|kotlin/Unit| { + [STATUS] public set([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { field# = value# } CallableContracts: FILE: propertyWithGetterAndSetter.kt - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] fun resolveMe(): R|kotlin/Unit| { + public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { receive#(withGetterAndSetter#) withGetterAndSetter# = IntegerLiteral(123) } @@ -241,7 +240,7 @@ FILE: propertyWithGetterAndSetter.kt DeclarationStatus: FILE: propertyWithGetterAndSetter.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun resolveMe(): R|kotlin/Unit| { + public final [STATUS] fun resolveMe(): R|kotlin/Unit| { receive#(withGetterAndSetter#) withGetterAndSetter# = IntegerLiteral(123) } @@ -257,7 +256,7 @@ FILE: propertyWithGetterAndSetter.kt ValueParametersTypes: FILE: propertyWithGetterAndSetter.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(withGetterAndSetter#) withGetterAndSetter# = IntegerLiteral(123) } @@ -273,7 +272,7 @@ FILE: propertyWithGetterAndSetter.kt TypeParametersTypes: FILE: propertyWithGetterAndSetter.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(withGetterAndSetter#) withGetterAndSetter# = IntegerLiteral(123) } @@ -289,13 +288,13 @@ FILE: propertyWithGetterAndSetter.kt FILE RAW TO BODY: FILE: propertyWithGetterAndSetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/withGetterAndSetter|) R|/withGetterAndSetter| = Int(123) } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun receive([BODY_RESOLVE] value: R|kotlin/Int|): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun receive([BODY_RESOLVE] value: R|kotlin/Int|): R|kotlin/Unit| { } - public final [BODY_RESOLVE] [IsReferredViaField=true, ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] var withGetterAndSetter: R|kotlin/Int| = Int(42) + public final [BODY_RESOLVE] [IsReferredViaField=true] var withGetterAndSetter: R|kotlin/Int| = Int(42) [BODY_RESOLVE] public get(): R|kotlin/Int| { ^ F|/withGetterAndSetter| } diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/propertyWithInitializer.txt b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/propertyWithInitializer.txt index 83ade361fb6..9b5de7d0c6c 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/propertyWithInitializer.txt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/propertyWithInitializer.txt @@ -1,4 +1,3 @@ - RAW_FIR: FILE: propertyWithInitializer.kt public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { @@ -17,7 +16,7 @@ FILE: propertyWithInitializer.kt SUPER_TYPES: FILE: propertyWithInitializer.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { + public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(property#) } public? final? [RAW_FIR] val property: Int = IntegerLiteral(10) @@ -25,7 +24,7 @@ FILE: propertyWithInitializer.kt TYPES: FILE: propertyWithInitializer.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(property#) } public? final? [RAW_FIR] val property: Int = IntegerLiteral(10) @@ -33,7 +32,7 @@ FILE: propertyWithInitializer.kt STATUS: FILE: propertyWithInitializer.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun resolveMe(): R|kotlin/Unit| { + public final [STATUS] fun resolveMe(): R|kotlin/Unit| { receive#(property#) } public? final? [RAW_FIR] val property: Int = IntegerLiteral(10) @@ -41,7 +40,7 @@ FILE: propertyWithInitializer.kt CONTRACTS: FILE: propertyWithInitializer.kt - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] fun resolveMe(): R|kotlin/Unit| { + public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { receive#(property#) } public? final? [RAW_FIR] val property: Int = IntegerLiteral(10) @@ -49,7 +48,7 @@ FILE: propertyWithInitializer.kt IMPLICIT_TYPES_BODY_RESOLVE: FILE: propertyWithInitializer.kt - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { receive#(property#) } public? final? [RAW_FIR] val property: Int = IntegerLiteral(10) @@ -57,10 +56,10 @@ FILE: propertyWithInitializer.kt BODY_RESOLVE: FILE: propertyWithInitializer.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { #(R|/property|) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] val property: R|kotlin/Int| = IntegerLiteral(10) + public final [STATUS] val property: R|kotlin/Int| = IntegerLiteral(10) [BODY_RESOLVE] public get(): R|kotlin/Int| NoResolve: @@ -73,18 +72,18 @@ FILE: propertyWithInitializer.kt BodyResolveWithChildren: FILE: propertyWithInitializer.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { #(R|/property|) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] val property: R|kotlin/Int| = IntegerLiteral(10) + public final [STATUS] val property: R|kotlin/Int| = IntegerLiteral(10) [BODY_RESOLVE] public get(): R|kotlin/Int| CallableBodyResolve: FILE: propertyWithInitializer.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { #(R|/property|) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] val property: R|kotlin/Int| = IntegerLiteral(10) + public final [STATUS] val property: R|kotlin/Int| = IntegerLiteral(10) [BODY_RESOLVE] public get(): R|kotlin/Int| CallableReturnType: @@ -97,7 +96,7 @@ FILE: propertyWithInitializer.kt AnnotationType: FILE: propertyWithInitializer.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(property#) } public? final? [RAW_FIR] val property: Int = IntegerLiteral(10) @@ -105,15 +104,15 @@ FILE: propertyWithInitializer.kt AnnotationsArguments: FILE: propertyWithInitializer.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { #(R|/property|) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] val property: R|kotlin/Int| = IntegerLiteral(10) + public final [STATUS] val property: R|kotlin/Int| = IntegerLiteral(10) [BODY_RESOLVE] public get(): R|kotlin/Int| CallableContracts: FILE: propertyWithInitializer.kt - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] fun resolveMe(): R|kotlin/Unit| { + public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { receive#(property#) } public? final? [RAW_FIR] val property: Int = IntegerLiteral(10) @@ -121,7 +120,7 @@ FILE: propertyWithInitializer.kt DeclarationStatus: FILE: propertyWithInitializer.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun resolveMe(): R|kotlin/Unit| { + public final [STATUS] fun resolveMe(): R|kotlin/Unit| { receive#(property#) } public? final? [RAW_FIR] val property: Int = IntegerLiteral(10) @@ -129,7 +128,7 @@ FILE: propertyWithInitializer.kt ValueParametersTypes: FILE: propertyWithInitializer.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(property#) } public? final? [RAW_FIR] val property: Int = IntegerLiteral(10) @@ -137,7 +136,7 @@ FILE: propertyWithInitializer.kt TypeParametersTypes: FILE: propertyWithInitializer.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(property#) } public? final? [RAW_FIR] val property: Int = IntegerLiteral(10) @@ -145,8 +144,8 @@ FILE: propertyWithInitializer.kt FILE RAW TO BODY: FILE: propertyWithInitializer.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { #(R|/property|) } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] val property: R|kotlin/Int| = Int(10) + public final [BODY_RESOLVE] val property: R|kotlin/Int| = Int(10) [BODY_RESOLVE] public get(): R|kotlin/Int| diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/secondaryConstructor.txt b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/secondaryConstructor.txt index e12c240b64e..3be9f2b225d 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/secondaryConstructor.txt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/secondaryConstructor.txt @@ -1,4 +1,3 @@ - RAW_FIR: FILE: secondaryConstructor.kt public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { @@ -31,7 +30,7 @@ FILE: secondaryConstructor.kt SUPER_TYPES: FILE: secondaryConstructor.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { + public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(A#(IntegerLiteral(42))) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { @@ -46,7 +45,7 @@ FILE: secondaryConstructor.kt TYPES: FILE: secondaryConstructor.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(A#(IntegerLiteral(42))) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { @@ -61,7 +60,7 @@ FILE: secondaryConstructor.kt STATUS: FILE: secondaryConstructor.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun resolveMe(): R|kotlin/Unit| { + public final [STATUS] fun resolveMe(): R|kotlin/Unit| { receive#(A#(IntegerLiteral(42))) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { @@ -76,7 +75,7 @@ FILE: secondaryConstructor.kt CONTRACTS: FILE: secondaryConstructor.kt - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] fun resolveMe(): R|kotlin/Unit| { + public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { receive#(A#(IntegerLiteral(42))) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { @@ -91,7 +90,7 @@ FILE: secondaryConstructor.kt IMPLICIT_TYPES_BODY_RESOLVE: FILE: secondaryConstructor.kt - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { receive#(A#(IntegerLiteral(42))) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { @@ -106,13 +105,13 @@ FILE: secondaryConstructor.kt BODY_RESOLVE: FILE: secondaryConstructor.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/A.A|(Int(42))) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|A|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|A|): R|kotlin/Unit| { } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public [STATUS] [ContainingClassKey=A, ResolvePhaseWithForAllDeclarationsKey=STATUS] constructor([STATUS] x: R|kotlin/Int|): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor([RAW_FIR] x: R|kotlin/Int|): R|A| { super() [RAW_FIR] lval a: = x# } @@ -136,13 +135,13 @@ FILE: secondaryConstructor.kt BodyResolveWithChildren: FILE: secondaryConstructor.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/A.A|(Int(42))) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|A|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|A|): R|kotlin/Unit| { } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public [STATUS] [ContainingClassKey=A, ResolvePhaseWithForAllDeclarationsKey=STATUS] constructor([STATUS] x: R|kotlin/Int|): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor([RAW_FIR] x: R|kotlin/Int|): R|A| { super() [RAW_FIR] lval a: = x# } @@ -151,13 +150,13 @@ FILE: secondaryConstructor.kt CallableBodyResolve: FILE: secondaryConstructor.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/A.A|(Int(42))) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|A|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|A|): R|kotlin/Unit| { } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public [STATUS] [ContainingClassKey=A, ResolvePhaseWithForAllDeclarationsKey=STATUS] constructor([STATUS] x: R|kotlin/Int|): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor([RAW_FIR] x: R|kotlin/Int|): R|A| { super() [RAW_FIR] lval a: = x# } @@ -181,7 +180,7 @@ FILE: secondaryConstructor.kt AnnotationType: FILE: secondaryConstructor.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(A#(IntegerLiteral(42))) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { @@ -196,13 +195,13 @@ FILE: secondaryConstructor.kt AnnotationsArguments: FILE: secondaryConstructor.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/A.A|(Int(42))) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|A|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|A|): R|kotlin/Unit| { } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class A : R|kotlin/Any| { - public [STATUS] [ContainingClassKey=A, ResolvePhaseWithForAllDeclarationsKey=STATUS] constructor([STATUS] x: R|kotlin/Int|): R|A| { + public final [STATUS] class A : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=A] constructor([RAW_FIR] x: R|kotlin/Int|): R|A| { super() [RAW_FIR] lval a: = x# } @@ -211,7 +210,7 @@ FILE: secondaryConstructor.kt CallableContracts: FILE: secondaryConstructor.kt - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] fun resolveMe(): R|kotlin/Unit| { + public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { receive#(A#(IntegerLiteral(42))) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { @@ -226,7 +225,7 @@ FILE: secondaryConstructor.kt DeclarationStatus: FILE: secondaryConstructor.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun resolveMe(): R|kotlin/Unit| { + public final [STATUS] fun resolveMe(): R|kotlin/Unit| { receive#(A#(IntegerLiteral(42))) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { @@ -241,7 +240,7 @@ FILE: secondaryConstructor.kt ValueParametersTypes: FILE: secondaryConstructor.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(A#(IntegerLiteral(42))) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { @@ -256,7 +255,7 @@ FILE: secondaryConstructor.kt TypeParametersTypes: FILE: secondaryConstructor.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(A#(IntegerLiteral(42))) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { @@ -271,12 +270,12 @@ FILE: secondaryConstructor.kt FILE RAW TO BODY: FILE: secondaryConstructor.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/A.A|(Int(42))) } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun receive([BODY_RESOLVE] value: R|A|): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun receive([BODY_RESOLVE] value: R|A|): R|kotlin/Unit| { } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] class A : R|kotlin/Any| { + public final [BODY_RESOLVE] class A : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=A] constructor([BODY_RESOLVE] x: R|kotlin/Int|): R|A| { super() [BODY_RESOLVE] lval a: R|kotlin/Int| = R|/x| diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/superTypes.txt b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/superTypes.txt index 889f2f59ee1..868a7a909df 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/superTypes.txt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/superTypes.txt @@ -1,4 +1,3 @@ - RAW_FIR: FILE: superTypes.kt public? open [RAW_FIR] class A : R|kotlin/Any| { @@ -43,7 +42,7 @@ FILE: superTypes.kt SUPER_TYPES: FILE: superTypes.kt - public? open [SUPER_TYPES] class A : R|kotlin/Any| { + public? open [RAW_FIR] class A : R|kotlin/Any| { public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { super() } @@ -55,8 +54,8 @@ FILE: superTypes.kt } } - public? open [SUPER_TYPES] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class resolveMe : R|A| { - public? [RAW_FIR] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { + public? open [SUPER_TYPES] class resolveMe : R|A| { + public? [SUPER_TYPES] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { super() } @@ -65,7 +64,7 @@ FILE: superTypes.kt TYPES: FILE: superTypes.kt public? open [SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public? [SUPER_TYPES] [ContainingClassKey=A] constructor(): R|A| { super() } @@ -76,7 +75,7 @@ FILE: superTypes.kt } } - public? open [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] class resolveMe : R|A| { + public? open [TYPES] class resolveMe : R|A| { public? [TYPES] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { super() } @@ -85,8 +84,8 @@ FILE: superTypes.kt STATUS: FILE: superTypes.kt - public open [STATUS] [ResolvePhaseWithForAllDeclarationsKey=TYPES] class A : R|kotlin/Any| { - public [STATUS] [ContainingClassKey=A] constructor(): R|A| { + public open [TYPES] class A : R|kotlin/Any| { + public [TYPES] [ContainingClassKey=A] constructor(): R|A| { super() } @@ -97,7 +96,7 @@ FILE: superTypes.kt } } - public open [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] class resolveMe : R|A| { + public open [STATUS] class resolveMe : R|A| { public [STATUS] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { super() } @@ -106,8 +105,8 @@ FILE: superTypes.kt CONTRACTS: FILE: superTypes.kt - public open [STATUS] [ResolvePhaseWithForAllDeclarationsKey=TYPES] class A : R|kotlin/Any| { - public [STATUS] [ContainingClassKey=A] constructor(): R|A| { + public open [TYPES] class A : R|kotlin/Any| { + public [TYPES] [ContainingClassKey=A] constructor(): R|A| { super() } @@ -118,7 +117,7 @@ FILE: superTypes.kt } } - public open [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] class resolveMe : R|A| { + public open [CONTRACTS] class resolveMe : R|A| { public [CONTRACTS] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { super() } @@ -127,8 +126,8 @@ FILE: superTypes.kt IMPLICIT_TYPES_BODY_RESOLVE: FILE: superTypes.kt - public open [STATUS] [ResolvePhaseWithForAllDeclarationsKey=TYPES] class A : R|kotlin/Any| { - public [STATUS] [ContainingClassKey=A] constructor(): R|A| { + public open [TYPES] class A : R|kotlin/Any| { + public [TYPES] [ContainingClassKey=A] constructor(): R|A| { super() } @@ -139,8 +138,8 @@ FILE: superTypes.kt } } - public open [IMPLICIT_TYPES_BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=IMPLICIT_TYPES_BODY_RESOLVE] class resolveMe : R|A| { - public [CONTRACTS] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { + public open [IMPLICIT_TYPES_BODY_RESOLVE] class resolveMe : R|A| { + public [IMPLICIT_TYPES_BODY_RESOLVE] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { super() } @@ -148,7 +147,7 @@ FILE: superTypes.kt BODY_RESOLVE: FILE: superTypes.kt - public open [STATUS] [ResolvePhaseWithForAllDeclarationsKey=TYPES] class A : R|kotlin/Any| { + public open [STATUS] class A : R|kotlin/Any| { public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } @@ -160,7 +159,7 @@ FILE: superTypes.kt } } - public open [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] class resolveMe : R|A| { + public open [BODY_RESOLVE] class resolveMe : R|A| { public [BODY_RESOLVE] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { super() } @@ -190,7 +189,7 @@ FILE: superTypes.kt BodyResolveWithChildren: FILE: superTypes.kt - public open [STATUS] [ResolvePhaseWithForAllDeclarationsKey=TYPES] class A : R|kotlin/Any| { + public open [STATUS] class A : R|kotlin/Any| { public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } @@ -202,7 +201,7 @@ FILE: superTypes.kt } } - public open [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] class resolveMe : R|A| { + public open [BODY_RESOLVE] class resolveMe : R|A| { public [BODY_RESOLVE] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { super() } @@ -212,7 +211,7 @@ FILE: superTypes.kt AnnotationType: FILE: superTypes.kt public? open [SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public? [SUPER_TYPES] [ContainingClassKey=A] constructor(): R|A| { super() } @@ -223,7 +222,7 @@ FILE: superTypes.kt } } - public? open [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] class resolveMe : R|A| { + public? open [TYPES] class resolveMe : R|A| { public? [TYPES] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { super() } @@ -232,7 +231,7 @@ FILE: superTypes.kt AnnotationsArguments: FILE: superTypes.kt - public open [STATUS] [ResolvePhaseWithForAllDeclarationsKey=TYPES] class A : R|kotlin/Any| { + public open [STATUS] class A : R|kotlin/Any| { public [STATUS] [ContainingClassKey=A] constructor(): R|A| { super() } @@ -244,7 +243,7 @@ FILE: superTypes.kt } } - public open [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] class resolveMe : R|A| { + public open [BODY_RESOLVE] class resolveMe : R|A| { public [BODY_RESOLVE] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { super() } @@ -253,7 +252,7 @@ FILE: superTypes.kt ClassSuperTypes: FILE: superTypes.kt - public? open [SUPER_TYPES] class A : R|kotlin/Any| { + public? open [RAW_FIR] class A : R|kotlin/Any| { public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { super() } @@ -265,8 +264,8 @@ FILE: superTypes.kt } } - public? open [SUPER_TYPES] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class resolveMe : R|A| { - public? [RAW_FIR] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { + public? open [SUPER_TYPES] class resolveMe : R|A| { + public? [SUPER_TYPES] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { super() } @@ -274,8 +273,8 @@ FILE: superTypes.kt DeclarationStatus: FILE: superTypes.kt - public open [STATUS] [ResolvePhaseWithForAllDeclarationsKey=TYPES] class A : R|kotlin/Any| { - public [STATUS] [ContainingClassKey=A] constructor(): R|A| { + public open [TYPES] class A : R|kotlin/Any| { + public [TYPES] [ContainingClassKey=A] constructor(): R|A| { super() } @@ -286,7 +285,7 @@ FILE: superTypes.kt } } - public open [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] class resolveMe : R|A| { + public open [STATUS] class resolveMe : R|A| { public [STATUS] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { super() } @@ -296,7 +295,7 @@ FILE: superTypes.kt ValueParametersTypes: FILE: superTypes.kt public? open [SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public? [SUPER_TYPES] [ContainingClassKey=A] constructor(): R|A| { super() } @@ -307,7 +306,7 @@ FILE: superTypes.kt } } - public? open [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] class resolveMe : R|A| { + public? open [TYPES] class resolveMe : R|A| { public? [TYPES] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { super() } @@ -317,7 +316,7 @@ FILE: superTypes.kt TypeParametersTypes: FILE: superTypes.kt public? open [SUPER_TYPES] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { + public? [SUPER_TYPES] [ContainingClassKey=A] constructor(): R|A| { super() } @@ -328,7 +327,7 @@ FILE: superTypes.kt } } - public? open [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] class resolveMe : R|A| { + public? open [TYPES] class resolveMe : R|A| { public? [TYPES] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { super() } @@ -337,19 +336,19 @@ FILE: superTypes.kt FILE RAW TO BODY: FILE: superTypes.kt - public open [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] class A : R|kotlin/Any| { + public open [BODY_RESOLVE] class A : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=A] constructor(): R|A| { super() } } - public open [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] class B : R|A| { + public open [BODY_RESOLVE] class B : R|A| { public [BODY_RESOLVE] [ContainingClassKey=B] constructor(): R|B| { super() } } - public open [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] class resolveMe : R|A| { + public open [BODY_RESOLVE] class resolveMe : R|A| { public [BODY_RESOLVE] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { super() } diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/superTypesLoop.txt b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/superTypesLoop.txt index 2819ec46e48..d5cfba95254 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/superTypesLoop.txt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/superTypesLoop.txt @@ -1,4 +1,3 @@ - RAW_FIR: FILE: superTypesLoop.kt public? open [RAW_FIR] class resolveMe : C { @@ -55,25 +54,25 @@ FILE: superTypesLoop.kt SUPER_TYPES: FILE: superTypesLoop.kt - public? open [SUPER_TYPES] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class resolveMe : R|C| { - public? [RAW_FIR] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { + public? open [SUPER_TYPES] class resolveMe : R|C| { + public? [SUPER_TYPES] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { super() } } - public? open [SUPER_TYPES] class A : /B> { + public? open [RAW_FIR] class A : /B> { public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { super() } } - public? open [SUPER_TYPES] class B : /C> { + public? open [RAW_FIR] class B : /C> { public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { super() } } - public? open [SUPER_TYPES] class C : /A> { + public? open [RAW_FIR] class C : /A> { public? [RAW_FIR] [ContainingClassKey=C] constructor(): R|C| { super() } @@ -82,26 +81,26 @@ FILE: superTypesLoop.kt TYPES: FILE: superTypesLoop.kt - public? open [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] class resolveMe : R|C| { + public? open [TYPES] class resolveMe : R|C| { public? [TYPES] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { super() } } - public? open [SUPER_TYPES] class A : /B> { + public? open [RAW_FIR] class A : /B> { public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { super() } } - public? open [SUPER_TYPES] class B : /C> { + public? open [RAW_FIR] class B : /C> { public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { super() } } public? open [SUPER_TYPES] class C : /A> { - public? [RAW_FIR] [ContainingClassKey=C] constructor(): R|C| { + public? [SUPER_TYPES] [ContainingClassKey=C] constructor(): R|C| { super() } @@ -109,26 +108,26 @@ FILE: superTypesLoop.kt STATUS: FILE: superTypesLoop.kt - public open [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] class resolveMe : R|C| { + public open [STATUS] class resolveMe : R|C| { public [STATUS] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { super() } } - public? open [SUPER_TYPES] class A : /B> { + public? open [RAW_FIR] class A : /B> { public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { super() } } - public? open [SUPER_TYPES] class B : /C> { + public? open [RAW_FIR] class B : /C> { public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { super() } } - public open [STATUS] [ResolvePhaseWithForAllDeclarationsKey=TYPES] class C : /A> { - public [STATUS] [ContainingClassKey=C] constructor(): R|C| { + public open [TYPES] class C : /A> { + public [TYPES] [ContainingClassKey=C] constructor(): R|C| { super() } @@ -136,26 +135,26 @@ FILE: superTypesLoop.kt CONTRACTS: FILE: superTypesLoop.kt - public open [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] class resolveMe : R|C| { + public open [CONTRACTS] class resolveMe : R|C| { public [CONTRACTS] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { super() } } - public? open [SUPER_TYPES] class A : /B> { + public? open [RAW_FIR] class A : /B> { public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { super() } } - public? open [SUPER_TYPES] class B : /C> { + public? open [RAW_FIR] class B : /C> { public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { super() } } - public open [STATUS] [ResolvePhaseWithForAllDeclarationsKey=TYPES] class C : /A> { - public [STATUS] [ContainingClassKey=C] constructor(): R|C| { + public open [TYPES] class C : /A> { + public [TYPES] [ContainingClassKey=C] constructor(): R|C| { super() } @@ -163,26 +162,26 @@ FILE: superTypesLoop.kt IMPLICIT_TYPES_BODY_RESOLVE: FILE: superTypesLoop.kt - public open [IMPLICIT_TYPES_BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=IMPLICIT_TYPES_BODY_RESOLVE] class resolveMe : R|C| { - public [CONTRACTS] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { + public open [IMPLICIT_TYPES_BODY_RESOLVE] class resolveMe : R|C| { + public [IMPLICIT_TYPES_BODY_RESOLVE] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { super() } } - public? open [SUPER_TYPES] class A : /B> { + public? open [RAW_FIR] class A : /B> { public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { super() } } - public? open [SUPER_TYPES] class B : /C> { + public? open [RAW_FIR] class B : /C> { public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { super() } } - public open [STATUS] [ResolvePhaseWithForAllDeclarationsKey=TYPES] class C : /A> { - public [STATUS] [ContainingClassKey=C] constructor(): R|C| { + public open [TYPES] class C : /A> { + public [TYPES] [ContainingClassKey=C] constructor(): R|C| { super() } @@ -190,25 +189,25 @@ FILE: superTypesLoop.kt BODY_RESOLVE: FILE: superTypesLoop.kt - public open [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] class resolveMe : R|C| { + public open [BODY_RESOLVE] class resolveMe : R|C| { public [BODY_RESOLVE] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { super() } } - public? open [SUPER_TYPES] class A : /B> { + public? open [RAW_FIR] class A : /B> { public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { super() } } - public? open [SUPER_TYPES] class B : /C> { + public? open [RAW_FIR] class B : /C> { public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { super() } } - public open [STATUS] [ResolvePhaseWithForAllDeclarationsKey=TYPES] class C : /A> { + public open [STATUS] class C : /A> { public [STATUS] [ContainingClassKey=C] constructor(): R|C| { super() } @@ -244,25 +243,25 @@ FILE: superTypesLoop.kt BodyResolveWithChildren: FILE: superTypesLoop.kt - public open [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] class resolveMe : R|C| { + public open [BODY_RESOLVE] class resolveMe : R|C| { public [BODY_RESOLVE] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { super() } } - public? open [SUPER_TYPES] class A : /B> { + public? open [RAW_FIR] class A : /B> { public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { super() } } - public? open [SUPER_TYPES] class B : /C> { + public? open [RAW_FIR] class B : /C> { public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { super() } } - public open [STATUS] [ResolvePhaseWithForAllDeclarationsKey=TYPES] class C : /A> { + public open [STATUS] class C : /A> { public [STATUS] [ContainingClassKey=C] constructor(): R|C| { super() } @@ -271,26 +270,26 @@ FILE: superTypesLoop.kt AnnotationType: FILE: superTypesLoop.kt - public? open [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] class resolveMe : R|C| { + public? open [TYPES] class resolveMe : R|C| { public? [TYPES] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { super() } } - public? open [SUPER_TYPES] class A : /B> { + public? open [RAW_FIR] class A : /B> { public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { super() } } - public? open [SUPER_TYPES] class B : /C> { + public? open [RAW_FIR] class B : /C> { public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { super() } } public? open [SUPER_TYPES] class C : /A> { - public? [RAW_FIR] [ContainingClassKey=C] constructor(): R|C| { + public? [SUPER_TYPES] [ContainingClassKey=C] constructor(): R|C| { super() } @@ -298,25 +297,25 @@ FILE: superTypesLoop.kt AnnotationsArguments: FILE: superTypesLoop.kt - public open [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] class resolveMe : R|C| { + public open [BODY_RESOLVE] class resolveMe : R|C| { public [BODY_RESOLVE] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { super() } } - public? open [SUPER_TYPES] class A : /B> { + public? open [RAW_FIR] class A : /B> { public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { super() } } - public? open [SUPER_TYPES] class B : /C> { + public? open [RAW_FIR] class B : /C> { public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { super() } } - public open [STATUS] [ResolvePhaseWithForAllDeclarationsKey=TYPES] class C : /A> { + public open [STATUS] class C : /A> { public [STATUS] [ContainingClassKey=C] constructor(): R|C| { super() } @@ -325,25 +324,25 @@ FILE: superTypesLoop.kt ClassSuperTypes: FILE: superTypesLoop.kt - public? open [SUPER_TYPES] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class resolveMe : R|C| { - public? [RAW_FIR] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { + public? open [SUPER_TYPES] class resolveMe : R|C| { + public? [SUPER_TYPES] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { super() } } - public? open [SUPER_TYPES] class A : /B> { + public? open [RAW_FIR] class A : /B> { public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { super() } } - public? open [SUPER_TYPES] class B : /C> { + public? open [RAW_FIR] class B : /C> { public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { super() } } - public? open [SUPER_TYPES] class C : /A> { + public? open [RAW_FIR] class C : /A> { public? [RAW_FIR] [ContainingClassKey=C] constructor(): R|C| { super() } @@ -352,26 +351,26 @@ FILE: superTypesLoop.kt DeclarationStatus: FILE: superTypesLoop.kt - public open [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] class resolveMe : R|C| { + public open [STATUS] class resolveMe : R|C| { public [STATUS] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { super() } } - public? open [SUPER_TYPES] class A : /B> { + public? open [RAW_FIR] class A : /B> { public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { super() } } - public? open [SUPER_TYPES] class B : /C> { + public? open [RAW_FIR] class B : /C> { public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { super() } } - public open [STATUS] [ResolvePhaseWithForAllDeclarationsKey=TYPES] class C : /A> { - public [STATUS] [ContainingClassKey=C] constructor(): R|C| { + public open [TYPES] class C : /A> { + public [TYPES] [ContainingClassKey=C] constructor(): R|C| { super() } @@ -379,26 +378,26 @@ FILE: superTypesLoop.kt ValueParametersTypes: FILE: superTypesLoop.kt - public? open [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] class resolveMe : R|C| { + public? open [TYPES] class resolveMe : R|C| { public? [TYPES] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { super() } } - public? open [SUPER_TYPES] class A : /B> { + public? open [RAW_FIR] class A : /B> { public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { super() } } - public? open [SUPER_TYPES] class B : /C> { + public? open [RAW_FIR] class B : /C> { public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { super() } } public? open [SUPER_TYPES] class C : /A> { - public? [RAW_FIR] [ContainingClassKey=C] constructor(): R|C| { + public? [SUPER_TYPES] [ContainingClassKey=C] constructor(): R|C| { super() } @@ -406,26 +405,26 @@ FILE: superTypesLoop.kt TypeParametersTypes: FILE: superTypesLoop.kt - public? open [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] class resolveMe : R|C| { + public? open [TYPES] class resolveMe : R|C| { public? [TYPES] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { super() } } - public? open [SUPER_TYPES] class A : /B> { + public? open [RAW_FIR] class A : /B> { public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { super() } } - public? open [SUPER_TYPES] class B : /C> { + public? open [RAW_FIR] class B : /C> { public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { super() } } public? open [SUPER_TYPES] class C : /A> { - public? [RAW_FIR] [ContainingClassKey=C] constructor(): R|C| { + public? [SUPER_TYPES] [ContainingClassKey=C] constructor(): R|C| { super() } @@ -433,25 +432,25 @@ FILE: superTypesLoop.kt FILE RAW TO BODY: FILE: superTypesLoop.kt - public open [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] class resolveMe : R|C| { + public open [BODY_RESOLVE] class resolveMe : R|C| { public [BODY_RESOLVE] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { super() } } - public open [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] class A : /B> { + public open [BODY_RESOLVE] class A : /B> { public [BODY_RESOLVE] [ContainingClassKey=A] constructor(): R|A| { super() } } - public open [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] class B : /C> { + public open [BODY_RESOLVE] class B : /C> { public [BODY_RESOLVE] [ContainingClassKey=B] constructor(): R|B| { super() } } - public open [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] class C : /A> { + public open [BODY_RESOLVE] class C : /A> { public [BODY_RESOLVE] [ContainingClassKey=C] constructor(): R|C| { super() } diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/topLevelFunctions.txt b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/topLevelFunctions.txt index e5d5e83d16b..619d983efc0 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/topLevelFunctions.txt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/topLevelFunctions.txt @@ -1,4 +1,3 @@ - RAW_FIR: FILE: topLevelFunctions.kt public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { @@ -23,7 +22,7 @@ FILE: topLevelFunctions.kt SUPER_TYPES: FILE: topLevelFunctions.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { + public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { @@ -34,7 +33,7 @@ FILE: topLevelFunctions.kt TYPES: FILE: topLevelFunctions.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { @@ -45,7 +44,7 @@ FILE: topLevelFunctions.kt STATUS: FILE: topLevelFunctions.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun resolveMe(): R|kotlin/Unit| { + public final [STATUS] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { @@ -56,7 +55,7 @@ FILE: topLevelFunctions.kt CONTRACTS: FILE: topLevelFunctions.kt - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] fun resolveMe(): R|kotlin/Unit| { + public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { @@ -67,7 +66,7 @@ FILE: topLevelFunctions.kt IMPLICIT_TYPES_BODY_RESOLVE: FILE: topLevelFunctions.kt - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { @@ -78,12 +77,12 @@ FILE: topLevelFunctions.kt BODY_RESOLVE: FILE: topLevelFunctions.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/functionWithLazyBody|()) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|kotlin/String|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun functionWithLazyBody(): R|kotlin/String| { + public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { ^functionWithLazyBody String(42) } @@ -100,23 +99,23 @@ FILE: topLevelFunctions.kt BodyResolveWithChildren: FILE: topLevelFunctions.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/functionWithLazyBody|()) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|kotlin/String|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun functionWithLazyBody(): R|kotlin/String| { + public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { ^functionWithLazyBody String(42) } CallableBodyResolve: FILE: topLevelFunctions.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/functionWithLazyBody|()) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|kotlin/String|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun functionWithLazyBody(): R|kotlin/String| { + public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { ^functionWithLazyBody String(42) } @@ -133,7 +132,7 @@ FILE: topLevelFunctions.kt AnnotationType: FILE: topLevelFunctions.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { @@ -144,18 +143,18 @@ FILE: topLevelFunctions.kt AnnotationsArguments: FILE: topLevelFunctions.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/functionWithLazyBody|()) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|kotlin/String|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun functionWithLazyBody(): R|kotlin/String| { + public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { ^functionWithLazyBody String(42) } CallableContracts: FILE: topLevelFunctions.kt - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] fun resolveMe(): R|kotlin/Unit| { + public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { @@ -166,7 +165,7 @@ FILE: topLevelFunctions.kt DeclarationStatus: FILE: topLevelFunctions.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun resolveMe(): R|kotlin/Unit| { + public final [STATUS] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { @@ -177,7 +176,7 @@ FILE: topLevelFunctions.kt ValueParametersTypes: FILE: topLevelFunctions.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { @@ -188,7 +187,7 @@ FILE: topLevelFunctions.kt TypeParametersTypes: FILE: topLevelFunctions.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { @@ -199,11 +198,11 @@ FILE: topLevelFunctions.kt FILE RAW TO BODY: FILE: topLevelFunctions.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/functionWithLazyBody|()) } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun receive([BODY_RESOLVE] value: R|kotlin/String|): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun receive([BODY_RESOLVE] value: R|kotlin/String|): R|kotlin/Unit| { } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun functionWithLazyBody(): R|kotlin/String| { + public final [BODY_RESOLVE] fun functionWithLazyBody(): R|kotlin/String| { ^functionWithLazyBody String(42) } diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/topLevelFunctionsWithExpressionBodyAndExplicitType.txt b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/topLevelFunctionsWithExpressionBodyAndExplicitType.txt index 93315662c42..ab38ab8867c 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/topLevelFunctionsWithExpressionBodyAndExplicitType.txt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/topLevelFunctionsWithExpressionBodyAndExplicitType.txt @@ -1,4 +1,3 @@ - RAW_FIR: FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { @@ -23,7 +22,7 @@ FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt SUPER_TYPES: FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { + public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { @@ -34,7 +33,7 @@ FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt TYPES: FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { @@ -45,7 +44,7 @@ FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt STATUS: FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun resolveMe(): R|kotlin/Unit| { + public final [STATUS] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { @@ -56,7 +55,7 @@ FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt CONTRACTS: FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] fun resolveMe(): R|kotlin/Unit| { + public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { @@ -67,7 +66,7 @@ FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt IMPLICIT_TYPES_BODY_RESOLVE: FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { @@ -78,12 +77,12 @@ FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt BODY_RESOLVE: FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/functionWithLazyBody|()) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|kotlin/String|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun functionWithLazyBody(): R|kotlin/String| { + public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { ^functionWithLazyBody String(42) } @@ -100,23 +99,23 @@ FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt BodyResolveWithChildren: FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/functionWithLazyBody|()) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|kotlin/String|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun functionWithLazyBody(): R|kotlin/String| { + public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { ^functionWithLazyBody String(42) } CallableBodyResolve: FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/functionWithLazyBody|()) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|kotlin/String|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun functionWithLazyBody(): R|kotlin/String| { + public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { ^functionWithLazyBody String(42) } @@ -133,7 +132,7 @@ FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt AnnotationType: FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { @@ -144,18 +143,18 @@ FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt AnnotationsArguments: FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/functionWithLazyBody|()) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|kotlin/String|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun functionWithLazyBody(): R|kotlin/String| { + public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { ^functionWithLazyBody String(42) } CallableContracts: FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] fun resolveMe(): R|kotlin/Unit| { + public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { @@ -166,7 +165,7 @@ FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt DeclarationStatus: FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun resolveMe(): R|kotlin/Unit| { + public final [STATUS] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { @@ -177,7 +176,7 @@ FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt ValueParametersTypes: FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { @@ -188,7 +187,7 @@ FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt TypeParametersTypes: FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { @@ -199,11 +198,11 @@ FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt FILE RAW TO BODY: FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/functionWithLazyBody|()) } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun receive([BODY_RESOLVE] value: R|kotlin/String|): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun receive([BODY_RESOLVE] value: R|kotlin/String|): R|kotlin/Unit| { } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun functionWithLazyBody(): R|kotlin/String| { + public final [BODY_RESOLVE] fun functionWithLazyBody(): R|kotlin/String| { ^functionWithLazyBody String(42) } diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/topLevelFunctionsWithImplicitType.txt b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/topLevelFunctionsWithImplicitType.txt index 68bc5ce8974..db13136d269 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/topLevelFunctionsWithImplicitType.txt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/topLevelFunctionsWithImplicitType.txt @@ -1,4 +1,3 @@ - RAW_FIR: FILE: topLevelFunctionsWithImplicitType.kt public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { @@ -23,7 +22,7 @@ FILE: topLevelFunctionsWithImplicitType.kt SUPER_TYPES: FILE: topLevelFunctionsWithImplicitType.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { + public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { @@ -34,7 +33,7 @@ FILE: topLevelFunctionsWithImplicitType.kt TYPES: FILE: topLevelFunctionsWithImplicitType.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { @@ -45,7 +44,7 @@ FILE: topLevelFunctionsWithImplicitType.kt STATUS: FILE: topLevelFunctionsWithImplicitType.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun resolveMe(): R|kotlin/Unit| { + public final [STATUS] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { @@ -56,7 +55,7 @@ FILE: topLevelFunctionsWithImplicitType.kt CONTRACTS: FILE: topLevelFunctionsWithImplicitType.kt - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] fun resolveMe(): R|kotlin/Unit| { + public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { @@ -67,7 +66,7 @@ FILE: topLevelFunctionsWithImplicitType.kt IMPLICIT_TYPES_BODY_RESOLVE: FILE: topLevelFunctionsWithImplicitType.kt - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { @@ -78,12 +77,12 @@ FILE: topLevelFunctionsWithImplicitType.kt BODY_RESOLVE: FILE: topLevelFunctionsWithImplicitType.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/functionWithLazyBody|()) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|kotlin/String|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun functionWithLazyBody(): R|kotlin/String| { + public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { ^functionWithLazyBody String(42) } @@ -100,23 +99,23 @@ FILE: topLevelFunctionsWithImplicitType.kt BodyResolveWithChildren: FILE: topLevelFunctionsWithImplicitType.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/functionWithLazyBody|()) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|kotlin/String|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun functionWithLazyBody(): R|kotlin/String| { + public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { ^functionWithLazyBody String(42) } CallableBodyResolve: FILE: topLevelFunctionsWithImplicitType.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/functionWithLazyBody|()) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|kotlin/String|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun functionWithLazyBody(): R|kotlin/String| { + public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { ^functionWithLazyBody String(42) } @@ -133,7 +132,7 @@ FILE: topLevelFunctionsWithImplicitType.kt AnnotationType: FILE: topLevelFunctionsWithImplicitType.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { @@ -144,18 +143,18 @@ FILE: topLevelFunctionsWithImplicitType.kt AnnotationsArguments: FILE: topLevelFunctionsWithImplicitType.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/functionWithLazyBody|()) } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun receive([STATUS] value: R|kotlin/String|): R|kotlin/Unit| { + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun functionWithLazyBody(): R|kotlin/String| { + public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { ^functionWithLazyBody String(42) } CallableContracts: FILE: topLevelFunctionsWithImplicitType.kt - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] fun resolveMe(): R|kotlin/Unit| { + public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { @@ -166,7 +165,7 @@ FILE: topLevelFunctionsWithImplicitType.kt DeclarationStatus: FILE: topLevelFunctionsWithImplicitType.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun resolveMe(): R|kotlin/Unit| { + public final [STATUS] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { @@ -177,7 +176,7 @@ FILE: topLevelFunctionsWithImplicitType.kt ValueParametersTypes: FILE: topLevelFunctionsWithImplicitType.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { @@ -188,7 +187,7 @@ FILE: topLevelFunctionsWithImplicitType.kt TypeParametersTypes: FILE: topLevelFunctionsWithImplicitType.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun resolveMe(): R|kotlin/Unit| { + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { @@ -199,11 +198,11 @@ FILE: topLevelFunctionsWithImplicitType.kt FILE RAW TO BODY: FILE: topLevelFunctionsWithImplicitType.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/functionWithLazyBody|()) } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun receive([BODY_RESOLVE] value: R|kotlin/String|): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun receive([BODY_RESOLVE] value: R|kotlin/String|): R|kotlin/Unit| { } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun functionWithLazyBody(): R|kotlin/String| { + public final [BODY_RESOLVE] fun functionWithLazyBody(): R|kotlin/String| { ^functionWithLazyBody String(42) } diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/typeParameterOfLocalFunction.txt b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/typeParameterOfLocalFunction.txt index 1cc9b961b0d..35151d038d8 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/typeParameterOfLocalFunction.txt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/typeParameterOfLocalFunction.txt @@ -8,7 +8,7 @@ FILE: typeParameterOfLocalFunction.kt IMPORTS: FILE: typeParameterOfLocalFunction.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] fun kkk(): R|kotlin/Unit| { } @@ -16,7 +16,7 @@ FILE: typeParameterOfLocalFunction.kt SUPER_TYPES: FILE: typeParameterOfLocalFunction.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] fun kkk(): R|kotlin/Unit| { } @@ -24,7 +24,7 @@ FILE: typeParameterOfLocalFunction.kt TYPES: FILE: typeParameterOfLocalFunction.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] fun kkk(): R|kotlin/Unit| { } @@ -32,7 +32,7 @@ FILE: typeParameterOfLocalFunction.kt STATUS: FILE: typeParameterOfLocalFunction.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] fun kkk(): R|kotlin/Unit| { } @@ -40,7 +40,7 @@ FILE: typeParameterOfLocalFunction.kt CONTRACTS: FILE: typeParameterOfLocalFunction.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] fun kkk(): R|kotlin/Unit| { } @@ -48,7 +48,7 @@ FILE: typeParameterOfLocalFunction.kt IMPLICIT_TYPES_BODY_RESOLVE: FILE: typeParameterOfLocalFunction.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] fun kkk(): R|kotlin/Unit| { } @@ -56,7 +56,7 @@ FILE: typeParameterOfLocalFunction.kt BODY_RESOLVE: FILE: typeParameterOfLocalFunction.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] fun kkk(): R|kotlin/Unit| { } @@ -72,7 +72,7 @@ FILE: typeParameterOfLocalFunction.kt BodyResolveWithChildren: FILE: typeParameterOfLocalFunction.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] fun kkk(): R|kotlin/Unit| { } @@ -80,7 +80,7 @@ FILE: typeParameterOfLocalFunction.kt AnnotationType: FILE: typeParameterOfLocalFunction.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] fun kkk(): R|kotlin/Unit| { } @@ -88,7 +88,7 @@ FILE: typeParameterOfLocalFunction.kt AnnotationsArguments: FILE: typeParameterOfLocalFunction.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] fun kkk(): R|kotlin/Unit| { } @@ -96,7 +96,7 @@ FILE: typeParameterOfLocalFunction.kt DeclarationStatus: FILE: typeParameterOfLocalFunction.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] fun kkk(): R|kotlin/Unit| { } @@ -104,7 +104,7 @@ FILE: typeParameterOfLocalFunction.kt ValueParametersTypes: FILE: typeParameterOfLocalFunction.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] fun kkk(): R|kotlin/Unit| { } @@ -112,7 +112,7 @@ FILE: typeParameterOfLocalFunction.kt TypeParametersTypes: FILE: typeParameterOfLocalFunction.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] fun kkk(): R|kotlin/Unit| { } @@ -120,7 +120,7 @@ FILE: typeParameterOfLocalFunction.kt FILE RAW TO BODY: FILE: typeParameterOfLocalFunction.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { local final [BODY_RESOLVE] fun kkk(): R|kotlin/Unit| { } diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/typeParameterOfNonLocalFunction.txt b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/typeParameterOfNonLocalFunction.txt index b1dff491e40..bfe0b0a3cbc 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/typeParameterOfNonLocalFunction.txt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/typeParameterOfNonLocalFunction.txt @@ -24,72 +24,72 @@ FILE: typeParameterOfNonLocalFunction.kt SUPER_TYPES: FILE: typeParameterOfNonLocalFunction.kt - public? final? [SUPER_TYPES] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class X : R|kotlin/Any| { + public? final? [RAW_FIR] class X : R|kotlin/Any| { public? [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { super() } - public? final? [RAW_FIR] fun ddd(): R|kotlin/Unit| { + public? final? [SUPER_TYPES] fun ddd(): R|kotlin/Unit| { } } TYPES: FILE: typeParameterOfNonLocalFunction.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class X : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { + public? final? [SUPER_TYPES] class X : R|kotlin/Any| { + public? [SUPER_TYPES] [ContainingClassKey=X] constructor(): R|X| { super() } - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun ddd(): R|kotlin/Unit| { + public? final? [TYPES] fun ddd(): R|kotlin/Unit| { } } STATUS: FILE: typeParameterOfNonLocalFunction.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class X : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { + public final [SUPER_TYPES] class X : R|kotlin/Any| { + public? [SUPER_TYPES] [ContainingClassKey=X] constructor(): R|X| { super() } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun ddd(): R|kotlin/Unit| { + public final [STATUS] fun ddd(): R|kotlin/Unit| { } } CONTRACTS: FILE: typeParameterOfNonLocalFunction.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class X : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { + public final [SUPER_TYPES] class X : R|kotlin/Any| { + public? [SUPER_TYPES] [ContainingClassKey=X] constructor(): R|X| { super() } - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] fun ddd(): R|kotlin/Unit| { + public final [CONTRACTS] fun ddd(): R|kotlin/Unit| { } } IMPLICIT_TYPES_BODY_RESOLVE: FILE: typeParameterOfNonLocalFunction.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class X : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { + public final [STATUS] class X : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=X] constructor(): R|X| { super() } - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=IMPLICIT_TYPES_BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [IMPLICIT_TYPES_BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { } } BODY_RESOLVE: FILE: typeParameterOfNonLocalFunction.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class X : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { + public final [STATUS] class X : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=X] constructor(): R|X| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { } } @@ -108,79 +108,79 @@ FILE: typeParameterOfNonLocalFunction.kt BodyResolveWithChildren: FILE: typeParameterOfNonLocalFunction.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class X : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { + public final [STATUS] class X : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=X] constructor(): R|X| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { } } AnnotationType: FILE: typeParameterOfNonLocalFunction.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class X : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { + public? final? [SUPER_TYPES] class X : R|kotlin/Any| { + public? [SUPER_TYPES] [ContainingClassKey=X] constructor(): R|X| { super() } - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun ddd(): R|kotlin/Unit| { + public? final? [TYPES] fun ddd(): R|kotlin/Unit| { } } AnnotationsArguments: FILE: typeParameterOfNonLocalFunction.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class X : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { + public final [STATUS] class X : R|kotlin/Any| { + public [STATUS] [ContainingClassKey=X] constructor(): R|X| { super() } - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { } } DeclarationStatus: FILE: typeParameterOfNonLocalFunction.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class X : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { + public final [SUPER_TYPES] class X : R|kotlin/Any| { + public? [SUPER_TYPES] [ContainingClassKey=X] constructor(): R|X| { super() } - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun ddd(): R|kotlin/Unit| { + public final [STATUS] fun ddd(): R|kotlin/Unit| { } } ValueParametersTypes: FILE: typeParameterOfNonLocalFunction.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class X : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { + public? final? [SUPER_TYPES] class X : R|kotlin/Any| { + public? [SUPER_TYPES] [ContainingClassKey=X] constructor(): R|X| { super() } - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun ddd(): R|kotlin/Unit| { + public? final? [TYPES] fun ddd(): R|kotlin/Unit| { } } TypeParametersTypes: FILE: typeParameterOfNonLocalFunction.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=SUPER_TYPES] class X : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { + public? final? [SUPER_TYPES] class X : R|kotlin/Any| { + public? [SUPER_TYPES] [ContainingClassKey=X] constructor(): R|X| { super() } - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun ddd(): R|kotlin/Unit| { + public? final? [TYPES] fun ddd(): R|kotlin/Unit| { } } FILE RAW TO BODY: FILE: typeParameterOfNonLocalFunction.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] class X : R|kotlin/Any| { + public final [BODY_RESOLVE] class X : R|kotlin/Any| { public [BODY_RESOLVE] [ContainingClassKey=X] constructor(): R|X| { super() } diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/typeParameterOfTopFunction.txt b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/typeParameterOfTopFunction.txt index 19bed5060db..956b1616b4a 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/typeParameterOfTopFunction.txt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/typeParameterOfTopFunction.txt @@ -10,32 +10,32 @@ FILE: typeParameterOfTopFunction.kt SUPER_TYPES: FILE: typeParameterOfTopFunction.kt - public? final? [RAW_FIR] fun ddd(): R|kotlin/Unit| { + public? final? [SUPER_TYPES] fun ddd(): R|kotlin/Unit| { } TYPES: FILE: typeParameterOfTopFunction.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun ddd(): R|kotlin/Unit| { + public? final? [TYPES] fun ddd(): R|kotlin/Unit| { } STATUS: FILE: typeParameterOfTopFunction.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun ddd(): R|kotlin/Unit| { + public final [STATUS] fun ddd(): R|kotlin/Unit| { } CONTRACTS: FILE: typeParameterOfTopFunction.kt - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] fun ddd(): R|kotlin/Unit| { + public final [CONTRACTS] fun ddd(): R|kotlin/Unit| { } IMPLICIT_TYPES_BODY_RESOLVE: FILE: typeParameterOfTopFunction.kt - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=IMPLICIT_TYPES_BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [IMPLICIT_TYPES_BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { } BODY_RESOLVE: FILE: typeParameterOfTopFunction.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { } NoResolve: @@ -45,35 +45,35 @@ FILE: typeParameterOfTopFunction.kt BodyResolveWithChildren: FILE: typeParameterOfTopFunction.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { } AnnotationType: FILE: typeParameterOfTopFunction.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun ddd(): R|kotlin/Unit| { + public? final? [TYPES] fun ddd(): R|kotlin/Unit| { } AnnotationsArguments: FILE: typeParameterOfTopFunction.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { } DeclarationStatus: FILE: typeParameterOfTopFunction.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] fun ddd(): R|kotlin/Unit| { + public final [STATUS] fun ddd(): R|kotlin/Unit| { } ValueParametersTypes: FILE: typeParameterOfTopFunction.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun ddd(): R|kotlin/Unit| { + public? final? [TYPES] fun ddd(): R|kotlin/Unit| { } TypeParametersTypes: FILE: typeParameterOfTopFunction.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] fun ddd(): R|kotlin/Unit| { + public? final? [TYPES] fun ddd(): R|kotlin/Unit| { } FILE RAW TO BODY: FILE: typeParameterOfTopFunction.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { + public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { } diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/typeParameterOfTopSetter.txt b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/typeParameterOfTopSetter.txt index d4433b5eb45..938c4a810d3 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/typeParameterOfTopSetter.txt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/typeParameterOfTopSetter.txt @@ -16,47 +16,47 @@ FILE: typeParameterOfTopSetter.kt SUPER_TYPES: FILE: typeParameterOfTopSetter.kt - public? final? [RAW_FIR] var x: Int = IntegerLiteral(2) + public? final? [SUPER_TYPES] var x: Int = IntegerLiteral(2) [TYPES] public? get(): Int - [RAW_FIR] public? set([RAW_FIR] resolveMe: Int): R|kotlin/Unit| { + [SUPER_TYPES] public? set([RAW_FIR] resolveMe: Int): R|kotlin/Unit| { ^ Unit# } TYPES: FILE: typeParameterOfTopSetter.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] var x: R|kotlin/Int| = IntegerLiteral(2) + public? final? [TYPES] var x: R|kotlin/Int| = IntegerLiteral(2) [TYPES] public? get(): R|kotlin/Int| - [TYPES] public? set([TYPES] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { + [TYPES] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { ^ Unit# } STATUS: FILE: typeParameterOfTopSetter.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] var x: R|kotlin/Int| = IntegerLiteral(2) + public final [STATUS] var x: R|kotlin/Int| = IntegerLiteral(2) [BODY_RESOLVE] public get(): R|kotlin/Int| - [STATUS] public set([STATUS] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { + [STATUS] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { ^ Unit# } CONTRACTS: FILE: typeParameterOfTopSetter.kt - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] var x: R|kotlin/Int| = IntegerLiteral(2) + public final [CONTRACTS] var x: R|kotlin/Int| = IntegerLiteral(2) [BODY_RESOLVE] public get(): R|kotlin/Int| - [CONTRACTS] public set([STATUS] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { + [CONTRACTS] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { ^ Unit# } IMPLICIT_TYPES_BODY_RESOLVE: FILE: typeParameterOfTopSetter.kt - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=IMPLICIT_TYPES_BODY_RESOLVE] var x: R|kotlin/Int| = IntegerLiteral(2) + public final [IMPLICIT_TYPES_BODY_RESOLVE] var x: R|kotlin/Int| = IntegerLiteral(2) [BODY_RESOLVE] public get(): R|kotlin/Int| - [CONTRACTS] public set([STATUS] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { + [IMPLICIT_TYPES_BODY_RESOLVE] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { ^ Unit# } BODY_RESOLVE: FILE: typeParameterOfTopSetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] var x: R|kotlin/Int| = Int(2) + public final [BODY_RESOLVE] var x: R|kotlin/Int| = Int(2) [BODY_RESOLVE] public get(): R|kotlin/Int| [BODY_RESOLVE] public set([BODY_RESOLVE] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { ^ Q|kotlin/Unit| @@ -72,7 +72,7 @@ FILE: typeParameterOfTopSetter.kt BodyResolveWithChildren: FILE: typeParameterOfTopSetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] var x: R|kotlin/Int| = Int(2) + public final [BODY_RESOLVE] var x: R|kotlin/Int| = Int(2) [BODY_RESOLVE] public get(): R|kotlin/Int| [BODY_RESOLVE] public set([BODY_RESOLVE] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { ^ Q|kotlin/Unit| @@ -80,7 +80,7 @@ FILE: typeParameterOfTopSetter.kt CallableBodyResolve: FILE: typeParameterOfTopSetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] var x: R|kotlin/Int| = Int(2) + public final [BODY_RESOLVE] var x: R|kotlin/Int| = Int(2) [BODY_RESOLVE] public get(): R|kotlin/Int| [BODY_RESOLVE] public set([BODY_RESOLVE] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { ^ Q|kotlin/Unit| @@ -88,23 +88,23 @@ FILE: typeParameterOfTopSetter.kt CallableReturnType: FILE: typeParameterOfTopSetter.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] var x: R|kotlin/Int| = IntegerLiteral(2) + public? final? [TYPES] var x: R|kotlin/Int| = IntegerLiteral(2) [TYPES] public? get(): R|kotlin/Int| - [TYPES] public? set([TYPES] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { + [TYPES] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { ^ Unit# } AnnotationType: FILE: typeParameterOfTopSetter.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] var x: R|kotlin/Int| = IntegerLiteral(2) + public? final? [TYPES] var x: R|kotlin/Int| = IntegerLiteral(2) [TYPES] public? get(): R|kotlin/Int| - [TYPES] public? set([TYPES] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { + [TYPES] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { ^ Unit# } AnnotationsArguments: FILE: typeParameterOfTopSetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] var x: R|kotlin/Int| = Int(2) + public final [BODY_RESOLVE] var x: R|kotlin/Int| = Int(2) [BODY_RESOLVE] public get(): R|kotlin/Int| [BODY_RESOLVE] public set([BODY_RESOLVE] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { ^ Q|kotlin/Unit| @@ -112,39 +112,39 @@ FILE: typeParameterOfTopSetter.kt CallableContracts: FILE: typeParameterOfTopSetter.kt - public final [CONTRACTS] [ResolvePhaseWithForAllDeclarationsKey=CONTRACTS] var x: R|kotlin/Int| = IntegerLiteral(2) + public final [CONTRACTS] var x: R|kotlin/Int| = IntegerLiteral(2) [BODY_RESOLVE] public get(): R|kotlin/Int| - [CONTRACTS] public set([STATUS] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { + [CONTRACTS] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { ^ Unit# } DeclarationStatus: FILE: typeParameterOfTopSetter.kt - public final [STATUS] [ResolvePhaseWithForAllDeclarationsKey=STATUS] var x: R|kotlin/Int| = IntegerLiteral(2) + public final [STATUS] var x: R|kotlin/Int| = IntegerLiteral(2) [BODY_RESOLVE] public get(): R|kotlin/Int| - [STATUS] public set([STATUS] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { + [STATUS] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { ^ Unit# } ValueParametersTypes: FILE: typeParameterOfTopSetter.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] var x: R|kotlin/Int| = IntegerLiteral(2) + public? final? [TYPES] var x: R|kotlin/Int| = IntegerLiteral(2) [TYPES] public? get(): R|kotlin/Int| - [TYPES] public? set([TYPES] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { + [TYPES] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { ^ Unit# } TypeParametersTypes: FILE: typeParameterOfTopSetter.kt - public? final? [TYPES] [ResolvePhaseWithForAllDeclarationsKey=TYPES] var x: R|kotlin/Int| = IntegerLiteral(2) + public? final? [TYPES] var x: R|kotlin/Int| = IntegerLiteral(2) [TYPES] public? get(): R|kotlin/Int| - [TYPES] public? set([TYPES] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { + [TYPES] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { ^ Unit# } FILE RAW TO BODY: FILE: typeParameterOfTopSetter.kt - public final [BODY_RESOLVE] [ResolvePhaseWithForAllDeclarationsKey=BODY_RESOLVE] var x: R|kotlin/Int| = Int(2) + public final [BODY_RESOLVE] var x: R|kotlin/Int| = Int(2) [BODY_RESOLVE] public get(): R|kotlin/Int| [BODY_RESOLVE] public set([BODY_RESOLVE] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { ^ Q|kotlin/Unit| diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/FirLazyDeclarationResolveTestGenerated.java b/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/FirLazyDeclarationResolveTestGenerated.java index 323ae6b5cb0..1ba7695ce3d 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/FirLazyDeclarationResolveTestGenerated.java +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/FirLazyDeclarationResolveTestGenerated.java @@ -42,6 +42,12 @@ public class FirLazyDeclarationResolveTestGenerated extends AbstractFirLazyDecla runTest("idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/delegates.kt"); } + @Test + @TestMetadata("functionWithParameter.kt") + public void testFunctionWithParameter() throws Exception { + runTest("idea/idea-frontend-fir/idea-fir-low-level-api/testdata/lazyResolve/functionWithParameter.kt"); + } + @Test @TestMetadata("localDeclaration.kt") public void testLocalDeclaration() throws Exception {