From a86bae2c3235a345155229048122604d87ff2da8 Mon Sep 17 00:00:00 2001 From: Dmitrii Gridin Date: Wed, 18 Oct 2023 15:18:29 +0200 Subject: [PATCH] [FIR] drop ARGUMENTS_OF_ANNOTATIONS phase ^KT-62679 Fixed --- ...irAnnotationArgumentMappingLazyResolver.kt | 7 +- .../LLFirAnnotationArgumentsLazyResolver.kt | 86 ----- .../LLFirLazyPhaseResolverByPhase.kt | 1 - .../contract.out_of_src_roots.txt | 2 +- .../testData/inBlockModification/contract.txt | 2 +- .../inBlockModification/contractScript.txt | 2 +- ...nWithBodyWithContract.out_of_src_roots.txt | 2 +- .../memberFunWithBodyWithContract.txt | 2 +- .../memberFunWithBodyWithContractScript.txt | 2 +- ...BodyWithErrorContract.out_of_src_roots.txt | 2 +- .../memberFunWithBodyWithErrorContract.txt | 2 +- ...mberFunWithBodyWithErrorContractScript.txt | 2 +- .../memberFunWithBodyWithFakeContract.txt | 2 +- ...emberFunWithBodyWithFakeContractScript.txt | 2 +- ...rWithBodyWithContract.out_of_src_roots.txt | 4 +- .../memberGetterWithBodyWithContract.txt | 4 +- ...memberGetterWithBodyWithContractScript.txt | 4 +- ...thContractWithoutName.out_of_src_roots.txt | 4 +- ...rGetterWithBodyWithContractWithoutName.txt | 4 +- ...rWithBodyWithContractWithoutNameScript.txt | 4 +- .../lazyResolve/annotationArgumentsMix.txt | 85 ++--- .../annotationArgumentsMixScript.txt | 93 ++--- ...onClassWithJavaTarget.out_of_src_roots.txt | 9 - .../annotationClassWithJavaTarget.txt | 13 +- .../annotationClassWithJavaTargetScript.txt | 18 +- .../annotationFromImplicitJavaType.txt | 4 - ...FromImplicitJavaTypeWithJavaAnnotation.txt | 4 - .../lazyResolve/annotationOnLocalClass.txt | 19 - .../annotationOnLocalClassScript.txt | 26 -- .../lazyResolve/annotationParameters.txt | 70 +--- .../annotationParametersScript.txt | 77 +--- .../annotationWithTypeArgument.txt | 17 +- .../annotationWithTypeArgumentScript.txt | 23 +- .../testData/lazyResolve/annotations.txt | 14 +- .../lazyResolve/annotationsScript.txt | 19 +- ...ithAnnotatedParameter.out_of_src_roots.txt | 16 - ...nonymousFunctionWithAnnotatedParameter.txt | 16 - ...thAnnotatedParameter2.out_of_src_roots.txt | 16 - ...onymousFunctionWithAnnotatedParameter2.txt | 16 - ...sFunctionWithAnnotatedParameter2Script.txt | 23 -- ...erOnImplicitTypePhase.out_of_src_roots.txt | 16 - ...hAnnotatedParameterOnImplicitTypePhase.txt | 16 - ...atedParameterOnImplicitTypePhaseScript.txt | 23 -- ...usFunctionWithAnnotatedParameterScript.txt | 23 -- .../testData/lazyResolve/classMembers.txt | 18 - .../lazyResolve/classMembersScript.txt | 23 -- .../testData/lazyResolve/classes/actual.txt | 23 -- ...otationWithArgumentInsideSuperTypeCall.txt | 25 +- ...hArgumentInsideSuperTypeCallUnresolved.txt | 9 - .../annotationWithConstantFromNestedClass.txt | 39 +-- .../classes/annotationWithTarget.txt | 25 +- .../classes/annotationWithTargetScript.txt | 31 +- .../classes/classWithTypeParameters.txt | 9 - .../classes/classWithTypeParametersScript.txt | 14 - .../compilerRequiredAnnotationConflict.txt | 33 -- .../compilerRequiredAnnotationConflict2.txt | 19 - .../classes/functionInValueClass.txt | 14 - .../classes/functionInValueClassScript.txt | 19 - .../classes/hierarchyWithOverride.txt | 29 -- .../hierarchyWithOverrideAndNestedClass.txt | 70 ---- .../hierarchyWithOverrideAndNestedClass2.txt | 70 ---- ...archyWithOverrideAndNestedClass2Script.txt | 78 ----- .../hierarchyWithOverrideAndNestedClass3.txt | 70 ---- ...archyWithOverrideAndNestedClass3Script.txt | 78 ----- .../hierarchyWithOverrideAndNestedClass4.txt | 70 ---- ...archyWithOverrideAndNestedClass4Script.txt | 78 ----- ...rarchyWithOverrideAndNestedClassScript.txt | 78 ----- .../classes/hierarchyWithOverrideScript.txt | 36 -- .../lazyResolve/classes/nestedClass.txt | 28 -- .../nestedClassAsAnnotationArgument.txt | 35 +- .../nestedClassAsAnnotationArgument2.txt | 35 +- .../lazyResolve/classes/nestedClassScript.txt | 35 -- .../nestedClassWithPropertiesOverrides.txt | 24 -- ...stedClassWithPropertiesOverridesScript.txt | 30 -- ...alifiedNestedClassAsAnnotationArgument.txt | 35 +- ...lifiedNestedClassAsAnnotationArgument2.txt | 35 +- .../classes/simpleLoopInOverride.txt | 15 - .../classes/simpleLoopInOverride2.txt | 15 - .../classes/simpleLoopInOverride2Script.txt | 22 -- .../classes/simpleLoopInOverrideScript.txt | 22 -- ...compilerRequiredAnnotationOnLocalClass.txt | 4 - ...erRequiredAnnotationOnLocalClassScript.txt | 9 - ...mpilerRequiredAnnotationsOnConstructor.txt | 25 +- ...quiredAnnotationsOnConstructorProperty.txt | 25 +- ...AnnotationsOnConstructorPropertyScript.txt | 31 +- ...RequiredAnnotationsOnConstructorScript.txt | 32 +- .../compilerRequiredAnnotationsOnFunction.txt | 17 +- ...lerRequiredAnnotationsOnFunctionScript.txt | 23 +- .../compilerRequiredAnnotationsOnProperty.txt | 27 +- ...onsOnPropertyDelegate.out_of_src_roots.txt | 20 +- ...rRequiredAnnotationsOnPropertyDelegate.txt | 20 +- ...redAnnotationsOnPropertyDelegateScript.txt | 27 +- ...lerRequiredAnnotationsOnPropertyScript.txt | 34 +- .../lazyResolve/complexLocalHierarchy.txt | 6 - .../complexLocalHierarchyScript.txt | 12 - .../lazyResolve/complexRedeclaration.txt | 92 ----- .../complexRedeclarationScript.txt | 106 ------ .../testData/lazyResolve/cyclicHierarchy.txt | 15 - .../testData/lazyResolve/cyclicHierarchy2.txt | 15 - .../lazyResolve/cyclicHierarchy2Script.txt | 25 -- .../testData/lazyResolve/cyclicHierarchy3.txt | 19 - .../lazyResolve/cyclicHierarchy3Script.txt | 31 -- .../lazyResolve/cyclicHierarchyScript.txt | 25 -- .../lazyResolve/cyclicNestedHierarchy.txt | 22 -- .../lazyResolve/cyclicNestedHierarchy2.txt | 22 -- .../cyclicNestedHierarchy2Script.txt | 28 -- .../cyclicNestedHierarchyScript.txt | 28 -- .../testData/lazyResolve/dataClassCopy.txt | 21 -- .../lazyResolve/dataClassCopyScript.txt | 26 -- .../testData/lazyResolve/dataComponent2.txt | 21 -- .../lazyResolve/dataComponent2Script.txt | 26 -- .../lazyResolve/delegateWithImplicitType.txt | 17 - ...gateWithImplicitTypeInDifferentModules.txt | 13 - .../delegateWithImplicitTypeScript.txt | 23 -- .../testData/lazyResolve/delegatedField.txt | 23 -- .../lazyResolve/delegatedFieldScript.txt | 30 -- .../testData/lazyResolve/delegates.txt | 29 -- .../testData/lazyResolve/delegatesScript.txt | 41 --- .../testData/lazyResolve/enumEntries.txt | 19 - .../lazyResolve/enumEntriesScript.txt | 24 -- .../testData/lazyResolve/enumEntry.txt | 25 -- .../testData/lazyResolve/enumEntryScript.txt | 31 -- .../testData/lazyResolve/enumValueOf.txt | 19 - .../lazyResolve/enumValueOfScript.txt | 24 -- .../testData/lazyResolve/enumValues.txt | 19 - .../testData/lazyResolve/enumValuesScript.txt | 24 -- .../annotationWithNamedFunctionArgument.txt | 19 +- .../anonymousObjectInInvalidPosition.txt | 9 - .../testData/lazyResolve/expectClass.txt | 5 - .../testData/lazyResolve/fakeOverride.txt | 40 +-- .../lazyResolve/fakeOverrideScript.txt | 47 +-- .../lazyResolve/fakePrimaryConstructor.txt | 11 - .../fakePrimaryConstructorScript.txt | 17 - .../testData/lazyResolve/fileAnnotations.txt | 19 +- .../lazyResolve/fileAnnotationsScript.txt | 24 +- .../testData/lazyResolve/fileElements.txt | 51 +-- .../lazyResolve/fromLocalHierarchyToOuter.txt | 22 -- .../fromLocalHierarchyToOuterScript.txt | 29 -- ...functionWithImplicitTypeAndAnnotations.txt | 105 +++--- ...onWithImplicitTypeAndAnnotationsScript.txt | 119 +++---- ...citTypeAndStringTemplateAsDefaultValue.txt | 6 - ...eAndStringTemplateAsDefaultValueScript.txt | 13 - .../lazyResolve/functionWithParameter.txt | 6 - .../functionWithParameterScript.txt | 13 - .../functions/contract.out_of_src_roots.txt | 4 - .../lazyResolve/functions/contract.txt | 4 - .../lazyResolve/functions/contractScript.txt | 9 - .../lazyResolve/functions/contractScript2.txt | 9 - .../functionCallWithGenericResult.txt | 11 - .../functionCallWithGenericResultScript.txt | 18 - .../functions/functionParameter.txt | 4 - .../functions/functionParameterScript.txt | 10 - .../functionWithGenericExpectedTypeInside.txt | 17 - ...ionWithGenericExpectedTypeInsideScript.txt | 25 -- .../functions/functionWithTypeParameters.txt | 4 - .../functionWithTypeParametersScript.txt | 9 - .../functions/hierarchyWithOverride.txt | 29 -- .../hierarchyWithOverrideAndNestedClass.txt | 70 ---- .../hierarchyWithOverrideAndNestedClass2.txt | 70 ---- ...archyWithOverrideAndNestedClass2Script.txt | 78 ----- .../hierarchyWithOverrideAndNestedClass3.txt | 70 ---- ...archyWithOverrideAndNestedClass3Script.txt | 78 ----- ...rarchyWithOverrideAndNestedClassScript.txt | 78 ----- .../functions/hierarchyWithOverrideScript.txt | 36 -- .../functions/simpleLoopInOverride.txt | 15 - .../functions/simpleLoopInOverride2.txt | 15 - .../functions/simpleLoopInOverride2Script.txt | 22 -- .../functions/simpleLoopInOverrideScript.txt | 22 -- .../functions/typeArgumentInAnnotation.txt | 17 +- .../unresolvedAnnotationOnFunctionType.txt | 4 - ...nctionWithRawContract.out_of_src_roots.txt | 8 - .../implicitTypeOnFunctionWithRawContract.txt | 8 - ...ypeOnFunctionWithUnresolvedRawContract.txt | 8 - ...nWithWrongRawContract.out_of_src_roots.txt | 8 - ...icitTypeOnFunctionWithWrongRawContract.txt | 8 - .../lazyResolve/lambdaAsSAMInterface.txt | 15 - .../lambdaAsSAMInterfaceScript.txt | 23 -- .../testData/lazyResolve/lazyProperty.txt | 28 -- .../lazyResolve/lazyPropertyScript.txt | 38 -- .../testData/lazyResolve/localConstructor.txt | 12 - .../lazyResolve/localConstructorScript.txt | 19 - .../localFunctionInsideAnnotationCall.txt | 20 -- ...ocalFunctionInsideAnnotationCallScript.txt | 26 -- .../localFunctionInsideFunctionLiteral.txt | 20 -- ...calFunctionInsideFunctionLiteralScript.txt | 26 -- ...onInsideLambdaCallInsideStringTemplate.txt | 22 -- ...deLambdaCallInsideStringTemplateScript.txt | 28 -- .../localFunctionInsideStatement.txt | 43 --- .../localFunctionInsideStringTemplate.txt | 18 - ...ocalFunctionInsideStringTemplateScript.txt | 24 -- .../localFunctionInsideSuperEntryCall.txt | 28 -- ...ocalFunctionInsideSuperEntryCallScript.txt | 35 -- .../testData/lazyResolve/localNestedClass.txt | 22 -- .../lazyResolve/localNestedClassScript.txt | 29 -- .../localParameterInsideSuperEntryCall.txt | 28 -- ...calParameterInsideSuperEntryCallScript.txt | 35 -- .../nestedCompilerRequiredAnnotations.txt | 65 +--- ...edCompilerRequiredAnnotationsForMember.txt | 65 +--- ...ilerRequiredAnnotationsForMemberScript.txt | 72 +--- ...dCompilerRequiredAnnotationsInsideBody.txt | 21 -- ...lerRequiredAnnotationsInsideBodyScript.txt | 28 -- ...estedCompilerRequiredAnnotationsScript.txt | 72 +--- .../testData/lazyResolve/nestedTypeAlias.txt | 30 -- .../testData/lazyResolve/nestedTypeAlias2.txt | 19 - .../lazyResolve/nestedTypeAlias2Script.txt | 25 -- .../lazyResolve/nestedTypeAliasScript.txt | 37 -- .../arrayOfCall.out_of_src_roots.txt | 12 - .../lazyResolve/noRuntime/arrayOfCall.txt | 12 - .../noRuntime/integerLiteralCall.txt | 4 - .../lazyResolve/parameterOfNonLocalSetter.txt | 13 - .../parameterOfNonLocalSetterScript.txt | 18 - .../lazyResolve/parameterOfTopSetter.txt | 6 - .../parameterOfTopSetterScript.txt | 11 - .../lazyResolve/primaryConstructor.txt | 11 - .../primaryConstructorParameter.txt | 11 - .../primaryConstructorParameterScript.txt | 17 - .../primaryConstructorProperty.txt | 14 - .../primaryConstructorPropertyScript.txt | 20 -- .../lazyResolve/primaryConstructorScript.txt | 17 - .../properties/getterWithDelegation.txt | 15 - .../properties/getterWithDelegationScript.txt | 22 -- .../properties/hierarchyWithOverride.txt | 32 -- .../hierarchyWithOverrideAndNestedClass.txt | 73 ---- .../hierarchyWithOverrideAndNestedClass2.txt | 73 ---- ...archyWithOverrideAndNestedClass2Script.txt | 81 ----- .../hierarchyWithOverrideAndNestedClass3.txt | 73 ---- ...archyWithOverrideAndNestedClass3Script.txt | 81 ----- .../hierarchyWithOverrideAndNestedClass4.txt | 76 ---- ...archyWithOverrideAndNestedClass4Script.txt | 84 ----- ...rarchyWithOverrideAndNestedClassScript.txt | 81 ----- .../hierarchyWithOverrideScript.txt | 39 --- .../propertyGetterWithExplicitType.txt | 5 - .../propertyGetterWithExplicitTypeAndBody.txt | 5 - ...rtyGetterWithExplicitTypeAndBodyScript.txt | 10 - .../propertyGetterWithExplicitTypeScript.txt | 10 - .../propertyGetterWithImplicitType.txt | 5 - .../propertyGetterWithImplicitTypeScript.txt | 10 - .../lazyResolve/properties/propertySetter.txt | 6 - .../properties/propertySetterScript.txt | 11 - .../properties/propertyWithTypeParameters.txt | 5 - .../propertyWithTypeParametersScript.txt | 10 - .../properties/simpleLoopInOverride.txt | 24 -- .../properties/simpleLoopInOverride2.txt | 24 -- .../simpleLoopInOverride2Script.txt | 31 -- .../properties/simpleLoopInOverrideScript.txt | 31 -- .../unresolvedAnnotationOnPropertyType.txt | 5 - .../lazyResolve/propertyWithGetter.txt | 7 - .../propertyWithGetterAndSetter.txt | 8 - .../propertyWithGetterAndSetterScript.txt | 15 - .../lazyResolve/propertyWithGetterScript.txt | 14 - ...propertyWithImplicitTypeAndAnnotations.txt | 125 +++---- ...tyWithImplicitTypeAndAnnotationsScript.txt | 139 +++----- ...rtyWithImplicitTypeAndFieldAnnotations.txt | 97 ++---- ...hImplicitTypeAndFieldAnnotationsScript.txt | 109 ++---- .../lazyResolve/propertyWithInitializer.txt | 6 - .../propertyWithInitializerScript.txt | 12 - .../testData/lazyResolve/redeclaration.txt | 15 - .../lazyResolve/redeclarationScript.txt | 22 -- .../resolveSuperTypeFromLocalClass.txt | 14 - .../resolveSuperTypeFromLocalClassScript.txt | 22 -- .../resolveTypeFromLocalClassConstructor.txt | 18 - ...lveTypeFromLocalClassConstructorScript.txt | 26 -- .../resolveTypeFromLocalFunction.txt | 18 - .../resolveTypeFromLocalFunctionScript.txt | 26 -- .../testData/lazyResolve/script.txt | 75 +--- .../testData/lazyResolve/script2.txt | 40 --- .../testData/lazyResolve/script3.txt | 34 -- .../testData/lazyResolve/script4.txt | 28 +- .../testData/lazyResolve/scriptArgument.txt | 7 - .../lazyResolve/secondaryConstructor.txt | 9 - .../secondaryConstructorParameter.txt | 19 - .../secondaryConstructorParameterScript.txt | 25 -- .../secondaryConstructorScript.txt | 16 - .../testData/lazyResolve/statement.txt | 49 --- .../testData/lazyResolve/statement2.txt | 35 -- .../lazyResolve/statementTransformation.txt | 13 - .../lazyResolve/substitutionFakeOverride.txt | 21 -- ...titutionFakeOverrideInDifferentModules.txt | 12 - .../substitutionFakeOverrideScript.txt | 27 -- ...bstitutionFakeOverrideWithImplicitType.txt | 23 -- ...tionFakeOverrideWithImplicitTypeScript.txt | 29 -- .../testData/lazyResolve/superTypes.txt | 21 -- .../testData/lazyResolve/superTypesLoop.txt | 27 -- .../lazyResolve/superTypesLoopScript.txt | 35 -- .../testData/lazyResolve/superTypesScript.txt | 28 -- .../explicitReturnType.txt | 14 - .../explicitReturnTypeAndAnnotations.txt | 41 +-- .../implicitReturnType.txt | 14 - .../implicitReturnTypeAndAnnotations.txt | 43 +-- ...plicitReturnTypeAndAnnotationsAsGetter.txt | 42 +-- .../secondGenerationOverride.txt | 84 ++--- .../setterAndExplicitReturnType.txt | 17 - ...terAndExplicitReturnTypeAndAnnotations.txt | 74 ++-- ...plicitReturnTypeAndAnnotationsAsGetter.txt | 48 +-- ...plicitReturnTypeAndAnnotationsAsSetter.txt | 56 +-- .../syntheticResultDeclaration.txt | 12 - .../syntheticResultDeclarationWithBigBody.txt | 12 - .../lazyResolve/topLevelFunctions.txt | 6 - .../lazyResolve/topLevelFunctionsScript.txt | 13 - ...tionsWithExpressionBodyAndExplicitType.txt | 6 - ...ithExpressionBodyAndExplicitTypeScript.txt | 13 - .../topLevelFunctionsWithImplicitType.txt | 6 - ...opLevelFunctionsWithImplicitTypeScript.txt | 13 - .../typeAliasWithTypeParameters.txt | 4 - .../typeAliasWithTypeParametersScript.txt | 9 - .../unresolvedAnnotationOnTypeAlias.txt | 5 - .../lazyResolve/typeParameterBounds.txt | 9 - .../lazyResolve/typeParameterBoundsScript.txt | 17 - .../lazyResolve/typeParameterOfClass.txt | 11 - .../lazyResolve/typeParameterOfClass2.txt | 16 - .../typeParameterOfClass2Script.txt | 21 -- .../typeParameterOfClassScript.txt | 16 - .../typeParameterOfNonLocalFunction.txt | 11 - .../typeParameterOfNonLocalFunctionScript.txt | 16 - .../typeParameterOfTopFunction.txt | 4 - .../typeParameterOfTopFunctionScript.txt | 9 - .../lazyResolve/typeParameterOfTopSetter.txt | 5 - .../typeParameterOfTopSetterScript.txt | 10 - .../lazyResolve/typeParameterOfTypeAlias.txt | 10 - .../typeParameterOfTypeAliasScript.txt | 16 - .../lazyResolveStdlibSources/wrappedInt.txt | 60 ---- .../jetbrains/kotlin/fir/FirCallResolver.kt | 10 - .../transformers/FirTotalResolveProcessor.kt | 1 - .../FirAnnotationArgumentsResolveProcessor.kt | 40 --- ...irAnnotationArgumentsResolveTransformer.kt | 328 ------------------ .../fir/declarations/FirResolvePhase.kt | 1 - 326 files changed, 538 insertions(+), 8535 deletions(-) delete mode 100644 analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/LLFirAnnotationArgumentsLazyResolver.kt delete mode 100644 compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/plugin/FirAnnotationArgumentsResolveProcessor.kt delete mode 100644 compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/plugin/FirAnnotationArgumentsResolveTransformer.kt diff --git a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/LLFirAnnotationArgumentMappingLazyResolver.kt b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/LLFirAnnotationArgumentMappingLazyResolver.kt index 172c804dcf8..12b982a7b71 100644 --- a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/LLFirAnnotationArgumentMappingLazyResolver.kt +++ b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/LLFirAnnotationArgumentMappingLazyResolver.kt @@ -65,7 +65,12 @@ private class LLFirAnnotationArgumentsMappingTargetResolver( ) override fun doLazyResolveUnderLock(target: FirElementWithResolveState) { - resolveWithKeeper(target, target.llFirSession, AnnotationArgumentMappingStateKeepers.DECLARATION) { + resolveWithKeeper( + target, + target.llFirSession, + AnnotationArgumentMappingStateKeepers.DECLARATION, + prepareTarget = FirLazyBodiesCalculator::calculateAnnotations, + ) { transformAnnotations(target) } } diff --git a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/LLFirAnnotationArgumentsLazyResolver.kt b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/LLFirAnnotationArgumentsLazyResolver.kt deleted file mode 100644 index 0cd8af76ad5..00000000000 --- a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/LLFirAnnotationArgumentsLazyResolver.kt +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.analysis.low.level.api.fir.transformers - -import org.jetbrains.kotlin.analysis.low.level.api.fir.api.targets.LLFirResolveTarget -import org.jetbrains.kotlin.analysis.low.level.api.fir.api.throwUnexpectedFirElementError -import org.jetbrains.kotlin.analysis.low.level.api.fir.file.builder.LLFirLockProvider -import org.jetbrains.kotlin.analysis.low.level.api.fir.lazy.resolve.FirLazyBodiesCalculator -import org.jetbrains.kotlin.fir.FirElementWithResolveState -import org.jetbrains.kotlin.fir.FirSession -import org.jetbrains.kotlin.fir.declarations.* -import org.jetbrains.kotlin.fir.resolve.ResolutionMode -import org.jetbrains.kotlin.fir.resolve.ScopeSession -import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.FirResolveContextCollector -import org.jetbrains.kotlin.fir.resolve.transformers.plugin.FirAnnotationArgumentsResolveTransformer -import org.jetbrains.kotlin.fir.visitors.transformSingle - -internal object LLFirAnnotationArgumentsLazyResolver : LLFirLazyResolver(FirResolvePhase.ARGUMENTS_OF_ANNOTATIONS) { - override fun resolve( - target: LLFirResolveTarget, - lockProvider: LLFirLockProvider, - session: FirSession, - scopeSession: ScopeSession, - towerDataContextCollector: FirResolveContextCollector?, - ) { - val resolver = LLFirAnnotationArgumentsTargetResolver(target, lockProvider, session, scopeSession, towerDataContextCollector) - resolver.resolveDesignation() - } -} - -private class LLFirAnnotationArgumentsTargetResolver( - target: LLFirResolveTarget, - lockProvider: LLFirLockProvider, - session: FirSession, - scopeSession: ScopeSession, - firResolveContextCollector: FirResolveContextCollector?, -) : LLFirAbstractBodyTargetResolver( - target, - lockProvider, - scopeSession, - FirResolvePhase.ARGUMENTS_OF_ANNOTATIONS, -) { - override val transformer = FirAnnotationArgumentsResolveTransformer( - session, - scopeSession, - resolverPhase, - returnTypeCalculator = createReturnTypeCalculator(firResolveContextCollector = firResolveContextCollector), - firResolveContextCollector = firResolveContextCollector, - ) - - @Deprecated("Should never be called directly, only for override purposes, please use withRegularClass", level = DeprecationLevel.ERROR) - override fun withRegularClassImpl(firClass: FirRegularClass, action: () -> Unit) { - transformer.declarationsTransformer.withRegularClass(firClass) { - action() - firClass - } - } - - override fun doLazyResolveUnderLock(target: FirElementWithResolveState) { - FirLazyBodiesCalculator.calculateAnnotations(target) - - when { - target is FirRegularClass -> { - val declarationTransformer = transformer.declarationsTransformer - target.transformAnnotations(declarationTransformer, ResolutionMode.ContextIndependent) - target.transformTypeParameters(declarationTransformer, ResolutionMode.ContextIndependent) - target.transformSuperTypeRefs(declarationTransformer, ResolutionMode.ContextIndependent) - } - - target is FirScript -> { - target.transformAnnotations(transformer.declarationsTransformer, ResolutionMode.ContextIndependent) - } - - target.isRegularDeclarationWithAnnotation -> { - target.transformSingle(transformer, ResolutionMode.ContextIndependent) - } - - target is FirCodeFragment || target is FirFile -> {} - - else -> throwUnexpectedFirElementError(target) - } - } -} diff --git a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/LLFirLazyPhaseResolverByPhase.kt b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/LLFirLazyPhaseResolverByPhase.kt index 7e99620d608..3f3d837ae8e 100644 --- a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/LLFirLazyPhaseResolverByPhase.kt +++ b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/LLFirLazyPhaseResolverByPhase.kt @@ -15,7 +15,6 @@ internal object LLFirLazyPhaseResolverByPhase { this[FirResolvePhase.TYPES] = LLFirTypeLazyResolver this[FirResolvePhase.STATUS] = LLFirStatusLazyResolver this[FirResolvePhase.COMPILER_REQUIRED_ANNOTATIONS] = LLFirCompilerAnnotationsLazyResolver - this[FirResolvePhase.ARGUMENTS_OF_ANNOTATIONS] = LLFirAnnotationArgumentsLazyResolver this[FirResolvePhase.CONTRACTS] = LLFirContractsLazyResolver this[FirResolvePhase.IMPLICIT_TYPES_BODY_RESOLVE] = LLFirImplicitTypesLazyResolver this[FirResolvePhase.ANNOTATIONS_ARGUMENTS_MAPPING] = LLFirAnnotationArgumentMappingLazyResolver diff --git a/analysis/low-level-api-fir/testData/inBlockModification/contract.out_of_src_roots.txt b/analysis/low-level-api-fir/testData/inBlockModification/contract.out_of_src_roots.txt index a8405f0cf64..81f9549d8eb 100644 --- a/analysis/low-level-api-fir/testData/inBlockModification/contract.out_of_src_roots.txt +++ b/analysis/low-level-api-fir/testData/inBlockModification/contract.out_of_src_roots.txt @@ -18,4 +18,4 @@ public final inline [ResolvedTo(BODY_RESOLVE)] fun foo([ResolvedTo(BODY_RESOLVE) } AFTER MODIFICATION: -public final inline [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] fun foo([ResolvedTo(BODY_RESOLVE)] block: R|() -> kotlin/Unit|): R|kotlin/Unit| { LAZY_BLOCK } +public final inline [ResolvedTo(EXPECT_ACTUAL_MATCHING)] fun foo([ResolvedTo(BODY_RESOLVE)] block: R|() -> kotlin/Unit|): R|kotlin/Unit| { LAZY_BLOCK } diff --git a/analysis/low-level-api-fir/testData/inBlockModification/contract.txt b/analysis/low-level-api-fir/testData/inBlockModification/contract.txt index e7c106948e1..4ce9cb6e3c5 100644 --- a/analysis/low-level-api-fir/testData/inBlockModification/contract.txt +++ b/analysis/low-level-api-fir/testData/inBlockModification/contract.txt @@ -16,4 +16,4 @@ public final inline [ResolvedTo(BODY_RESOLVE)] fun foo([ResolvedTo(BODY_RESOLVE) } AFTER MODIFICATION: -public final inline [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] fun foo([ResolvedTo(BODY_RESOLVE)] block: R|() -> kotlin/Unit|): R|kotlin/Unit| { LAZY_BLOCK } +public final inline [ResolvedTo(EXPECT_ACTUAL_MATCHING)] fun foo([ResolvedTo(BODY_RESOLVE)] block: R|() -> kotlin/Unit|): R|kotlin/Unit| { LAZY_BLOCK } diff --git a/analysis/low-level-api-fir/testData/inBlockModification/contractScript.txt b/analysis/low-level-api-fir/testData/inBlockModification/contractScript.txt index e7c106948e1..4ce9cb6e3c5 100644 --- a/analysis/low-level-api-fir/testData/inBlockModification/contractScript.txt +++ b/analysis/low-level-api-fir/testData/inBlockModification/contractScript.txt @@ -16,4 +16,4 @@ public final inline [ResolvedTo(BODY_RESOLVE)] fun foo([ResolvedTo(BODY_RESOLVE) } AFTER MODIFICATION: -public final inline [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] fun foo([ResolvedTo(BODY_RESOLVE)] block: R|() -> kotlin/Unit|): R|kotlin/Unit| { LAZY_BLOCK } +public final inline [ResolvedTo(EXPECT_ACTUAL_MATCHING)] fun foo([ResolvedTo(BODY_RESOLVE)] block: R|() -> kotlin/Unit|): R|kotlin/Unit| { LAZY_BLOCK } diff --git a/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithContract.out_of_src_roots.txt b/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithContract.out_of_src_roots.txt index 3949d0b8af2..950b97666d1 100644 --- a/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithContract.out_of_src_roots.txt +++ b/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithContract.out_of_src_roots.txt @@ -18,4 +18,4 @@ public final [ResolvedTo(BODY_RESOLVE)] fun x(): R|kotlin/Unit| } AFTER MODIFICATION: -public final [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] fun x(): R|kotlin/Unit| { LAZY_BLOCK } +public final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] fun x(): R|kotlin/Unit| { LAZY_BLOCK } diff --git a/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithContract.txt b/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithContract.txt index a2fb4e25c9e..838bd630837 100644 --- a/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithContract.txt +++ b/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithContract.txt @@ -15,4 +15,4 @@ public final [ResolvedTo(BODY_RESOLVE)] fun x(): R|kotlin/Unit| } AFTER MODIFICATION: -public final [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] fun x(): R|kotlin/Unit| { LAZY_BLOCK } +public final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] fun x(): R|kotlin/Unit| { LAZY_BLOCK } diff --git a/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithContractScript.txt b/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithContractScript.txt index a2fb4e25c9e..838bd630837 100644 --- a/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithContractScript.txt +++ b/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithContractScript.txt @@ -15,4 +15,4 @@ public final [ResolvedTo(BODY_RESOLVE)] fun x(): R|kotlin/Unit| } AFTER MODIFICATION: -public final [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] fun x(): R|kotlin/Unit| { LAZY_BLOCK } +public final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] fun x(): R|kotlin/Unit| { LAZY_BLOCK } diff --git a/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithErrorContract.out_of_src_roots.txt b/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithErrorContract.out_of_src_roots.txt index c49cac7fc88..5de95b7c043 100644 --- a/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithErrorContract.out_of_src_roots.txt +++ b/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithErrorContract.out_of_src_roots.txt @@ -12,4 +12,4 @@ public final [ResolvedTo(BODY_RESOLVE)] fun passLambdaValue([ResolvedTo(BODY_RES } AFTER MODIFICATION: -public final [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] fun passLambdaValue([ResolvedTo(BODY_RESOLVE)] l: R|ERROR CLASS: Symbol not found for ContractBuilder.() -> kotlin/Unit|): R|kotlin/Unit| { LAZY_BLOCK } +public final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] fun passLambdaValue([ResolvedTo(BODY_RESOLVE)] l: R|ERROR CLASS: Symbol not found for ContractBuilder.() -> kotlin/Unit|): R|kotlin/Unit| { LAZY_BLOCK } diff --git a/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithErrorContract.txt b/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithErrorContract.txt index 47c1cdbbe79..72d29705166 100644 --- a/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithErrorContract.txt +++ b/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithErrorContract.txt @@ -12,4 +12,4 @@ public final [ResolvedTo(BODY_RESOLVE)] fun passLambdaValue([ResolvedTo(BODY_RES } AFTER MODIFICATION: -public final [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] fun passLambdaValue([ResolvedTo(BODY_RESOLVE)] l: R|kotlin/contracts/ContractBuilder.() -> kotlin/Unit|): R|kotlin/Unit| { LAZY_BLOCK } +public final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] fun passLambdaValue([ResolvedTo(BODY_RESOLVE)] l: R|kotlin/contracts/ContractBuilder.() -> kotlin/Unit|): R|kotlin/Unit| { LAZY_BLOCK } diff --git a/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithErrorContractScript.txt b/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithErrorContractScript.txt index 47c1cdbbe79..72d29705166 100644 --- a/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithErrorContractScript.txt +++ b/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithErrorContractScript.txt @@ -12,4 +12,4 @@ public final [ResolvedTo(BODY_RESOLVE)] fun passLambdaValue([ResolvedTo(BODY_RES } AFTER MODIFICATION: -public final [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] fun passLambdaValue([ResolvedTo(BODY_RESOLVE)] l: R|kotlin/contracts/ContractBuilder.() -> kotlin/Unit|): R|kotlin/Unit| { LAZY_BLOCK } +public final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] fun passLambdaValue([ResolvedTo(BODY_RESOLVE)] l: R|kotlin/contracts/ContractBuilder.() -> kotlin/Unit|): R|kotlin/Unit| { LAZY_BLOCK } diff --git a/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithFakeContract.txt b/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithFakeContract.txt index 3949d0b8af2..950b97666d1 100644 --- a/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithFakeContract.txt +++ b/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithFakeContract.txt @@ -18,4 +18,4 @@ public final [ResolvedTo(BODY_RESOLVE)] fun x(): R|kotlin/Unit| } AFTER MODIFICATION: -public final [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] fun x(): R|kotlin/Unit| { LAZY_BLOCK } +public final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] fun x(): R|kotlin/Unit| { LAZY_BLOCK } diff --git a/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithFakeContractScript.txt b/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithFakeContractScript.txt index 3949d0b8af2..950b97666d1 100644 --- a/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithFakeContractScript.txt +++ b/analysis/low-level-api-fir/testData/inBlockModification/memberFunWithBodyWithFakeContractScript.txt @@ -18,4 +18,4 @@ public final [ResolvedTo(BODY_RESOLVE)] fun x(): R|kotlin/Unit| } AFTER MODIFICATION: -public final [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] fun x(): R|kotlin/Unit| { LAZY_BLOCK } +public final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] fun x(): R|kotlin/Unit| { LAZY_BLOCK } diff --git a/analysis/low-level-api-fir/testData/inBlockModification/memberGetterWithBodyWithContract.out_of_src_roots.txt b/analysis/low-level-api-fir/testData/inBlockModification/memberGetterWithBodyWithContract.out_of_src_roots.txt index 949bcd5fc8a..f84fe9e68fb 100644 --- a/analysis/low-level-api-fir/testData/inBlockModification/memberGetterWithBodyWithContract.out_of_src_roots.txt +++ b/analysis/low-level-api-fir/testData/inBlockModification/memberGetterWithBodyWithContract.out_of_src_roots.txt @@ -26,8 +26,8 @@ public final [ResolvedTo(BODY_RESOLVE)] var x: R|kotlin/Int| } AFTER MODIFICATION: -public final [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] var x: R|kotlin/Int| - public [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] [ContainingClassKey=A] get(): R|kotlin/Int| { LAZY_BLOCK } +public final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] var x: R|kotlin/Int| + public [ResolvedTo(EXPECT_ACTUAL_MATCHING)] [ContainingClassKey=A] get(): R|kotlin/Int| { LAZY_BLOCK } public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=A] set([ResolvedTo(BODY_RESOLVE)] value: R|kotlin/Int|): R|kotlin/Unit| { ^ Q|kotlin/Unit| } diff --git a/analysis/low-level-api-fir/testData/inBlockModification/memberGetterWithBodyWithContract.txt b/analysis/low-level-api-fir/testData/inBlockModification/memberGetterWithBodyWithContract.txt index 27c3eb22663..75b8f8cc461 100644 --- a/analysis/low-level-api-fir/testData/inBlockModification/memberGetterWithBodyWithContract.txt +++ b/analysis/low-level-api-fir/testData/inBlockModification/memberGetterWithBodyWithContract.txt @@ -23,8 +23,8 @@ public final [ResolvedTo(BODY_RESOLVE)] var x: R|kotlin/Int| } AFTER MODIFICATION: -public final [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] var x: R|kotlin/Int| - public [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] [ContainingClassKey=A] get(): R|kotlin/Int| { LAZY_BLOCK } +public final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] var x: R|kotlin/Int| + public [ResolvedTo(EXPECT_ACTUAL_MATCHING)] [ContainingClassKey=A] get(): R|kotlin/Int| { LAZY_BLOCK } public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=A] set([ResolvedTo(BODY_RESOLVE)] value: R|kotlin/Int|): R|kotlin/Unit| { ^ Q|kotlin/Unit| } diff --git a/analysis/low-level-api-fir/testData/inBlockModification/memberGetterWithBodyWithContractScript.txt b/analysis/low-level-api-fir/testData/inBlockModification/memberGetterWithBodyWithContractScript.txt index 27c3eb22663..75b8f8cc461 100644 --- a/analysis/low-level-api-fir/testData/inBlockModification/memberGetterWithBodyWithContractScript.txt +++ b/analysis/low-level-api-fir/testData/inBlockModification/memberGetterWithBodyWithContractScript.txt @@ -23,8 +23,8 @@ public final [ResolvedTo(BODY_RESOLVE)] var x: R|kotlin/Int| } AFTER MODIFICATION: -public final [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] var x: R|kotlin/Int| - public [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] [ContainingClassKey=A] get(): R|kotlin/Int| { LAZY_BLOCK } +public final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] var x: R|kotlin/Int| + public [ResolvedTo(EXPECT_ACTUAL_MATCHING)] [ContainingClassKey=A] get(): R|kotlin/Int| { LAZY_BLOCK } public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=A] set([ResolvedTo(BODY_RESOLVE)] value: R|kotlin/Int|): R|kotlin/Unit| { ^ Q|kotlin/Unit| } diff --git a/analysis/low-level-api-fir/testData/inBlockModification/memberGetterWithBodyWithContractWithoutName.out_of_src_roots.txt b/analysis/low-level-api-fir/testData/inBlockModification/memberGetterWithBodyWithContractWithoutName.out_of_src_roots.txt index 5bd8575a30f..106adbb7a76 100644 --- a/analysis/low-level-api-fir/testData/inBlockModification/memberGetterWithBodyWithContractWithoutName.out_of_src_roots.txt +++ b/analysis/low-level-api-fir/testData/inBlockModification/memberGetterWithBodyWithContractWithoutName.out_of_src_roots.txt @@ -26,8 +26,8 @@ public final [ResolvedTo(BODY_RESOLVE)] var : R|kotlin/Int| } AFTER MODIFICATION: -public final [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] var : R|kotlin/Int| - public [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] [ContainingClassKey=A] get(): R|kotlin/Int| { LAZY_BLOCK } +public final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] var : R|kotlin/Int| + public [ResolvedTo(EXPECT_ACTUAL_MATCHING)] [ContainingClassKey=A] get(): R|kotlin/Int| { LAZY_BLOCK } public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=A] set([ResolvedTo(BODY_RESOLVE)] value: R|kotlin/Int|): R|kotlin/Unit| { ^ Q|kotlin/Unit| } diff --git a/analysis/low-level-api-fir/testData/inBlockModification/memberGetterWithBodyWithContractWithoutName.txt b/analysis/low-level-api-fir/testData/inBlockModification/memberGetterWithBodyWithContractWithoutName.txt index 17adf14c7d5..d7141853240 100644 --- a/analysis/low-level-api-fir/testData/inBlockModification/memberGetterWithBodyWithContractWithoutName.txt +++ b/analysis/low-level-api-fir/testData/inBlockModification/memberGetterWithBodyWithContractWithoutName.txt @@ -23,8 +23,8 @@ public final [ResolvedTo(BODY_RESOLVE)] var : R|kotlin/Int| } AFTER MODIFICATION: -public final [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] var : R|kotlin/Int| - public [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] [ContainingClassKey=A] get(): R|kotlin/Int| { LAZY_BLOCK } +public final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] var : R|kotlin/Int| + public [ResolvedTo(EXPECT_ACTUAL_MATCHING)] [ContainingClassKey=A] get(): R|kotlin/Int| { LAZY_BLOCK } public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=A] set([ResolvedTo(BODY_RESOLVE)] value: R|kotlin/Int|): R|kotlin/Unit| { ^ Q|kotlin/Unit| } diff --git a/analysis/low-level-api-fir/testData/inBlockModification/memberGetterWithBodyWithContractWithoutNameScript.txt b/analysis/low-level-api-fir/testData/inBlockModification/memberGetterWithBodyWithContractWithoutNameScript.txt index 17adf14c7d5..d7141853240 100644 --- a/analysis/low-level-api-fir/testData/inBlockModification/memberGetterWithBodyWithContractWithoutNameScript.txt +++ b/analysis/low-level-api-fir/testData/inBlockModification/memberGetterWithBodyWithContractWithoutNameScript.txt @@ -23,8 +23,8 @@ public final [ResolvedTo(BODY_RESOLVE)] var : R|kotlin/Int| } AFTER MODIFICATION: -public final [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] var : R|kotlin/Int| - public [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] [ContainingClassKey=A] get(): R|kotlin/Int| { LAZY_BLOCK } +public final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] var : R|kotlin/Int| + public [ResolvedTo(EXPECT_ACTUAL_MATCHING)] [ContainingClassKey=A] get(): R|kotlin/Int| { LAZY_BLOCK } public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=A] set([ResolvedTo(BODY_RESOLVE)] value: R|kotlin/Int|): R|kotlin/Unit| { ^ Q|kotlin/Unit| } diff --git a/analysis/low-level-api-fir/testData/lazyResolve/annotationArgumentsMix.txt b/analysis/low-level-api-fir/testData/lazyResolve/annotationArgumentsMix.txt index 83a91d79c81..0852aef41cc 100644 --- a/analysis/low-level-api-fir/testData/lazyResolve/annotationArgumentsMix.txt +++ b/analysis/low-level-api-fir/testData/lazyResolve/annotationArgumentsMix.txt @@ -358,74 +358,29 @@ FILE: [ResolvedTo(IMPORTS)] annotationArgumentsMix.kt } @R|kotlin/Deprecated|[Types](boo#()) @R|Anno|[Types](LAZY_EXPRESSION, LAZY_EXPRESSION, LAZY_EXPRESSION, LAZY_EXPRESSION) public final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] fun foo(): R|kotlin/Unit| { LAZY_BLOCK } -ARGUMENTS_OF_ANNOTATIONS: -FILE: [ResolvedTo(IMPORTS)] annotationArgumentsMix.kt - public final [ResolvedTo(STATUS)] annotation class AnotherAnnotation : R|kotlin/Annotation| { - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnotherAnnotation] constructor(): R|AnotherAnnotation| { - LAZY_super - } - - } - public final [ResolvedTo(STATUS)] enum class EnumClass : R|kotlin/Enum| { - private [ResolvedTo(STATUS)] [ContainingClassKey=EnumClass] constructor(): R|EnumClass| { - LAZY_super|> - } - - public final static [ResolvedTo(STATUS)] [ContainingClassKey=EnumClass] enum entry First: R|EnumClass| - public final static [ResolvedTo(STATUS)] [ContainingClassKey=EnumClass] enum entry Second: R|EnumClass| - public final static [ResolvedTo(STATUS)] [ContainingClassKey=EnumClass] fun values(): R|kotlin/Array| { - } - - public final static [ResolvedTo(STATUS)] [ContainingClassKey=EnumClass] fun valueOf([ResolvedTo(STATUS)] value: R|kotlin/String|): R|EnumClass| { - } - - public final static [ResolvedTo(STATUS)] [ContainingClassKey=EnumClass] val entries: R|kotlin/enums/EnumEntries| - public [ResolvedTo(STATUS)] get(): R|kotlin/enums/EnumEntries| - - } - public? final? [ResolvedTo(RAW_FIR)] annotation class Anno : R|kotlin/Annotation| { - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Anno.str] str: String, [ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Anno.ann] ann: AnotherAnnotation, [ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Anno.c] c: KClass<*>, [ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Anno.entry] entry: EnumClass): R|Anno| { - LAZY_super - } - - public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val str: String = R|/str| - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): String - - public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val ann: AnotherAnnotation = R|/ann| - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): AnotherAnnotation - - public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val c: KClass<*> = R|/c| - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): KClass<*> - - public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val entry: EnumClass = R|/entry| - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): EnumClass - - } - @R|kotlin/Deprecated|[Types](boo#()) @R|Anno|[Types](String(123), AnotherAnnotation#(), (Q|AnotherAnnotation|), Q|EnumClass|.R|/EnumClass.Second|) public final [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] fun foo(): R|kotlin/Unit| { LAZY_BLOCK } - CONTRACTS: FILE: [ResolvedTo(IMPORTS)] annotationArgumentsMix.kt - public final [ResolvedTo(STATUS)] annotation class AnotherAnnotation : R|kotlin/Annotation| { + public? final? [ResolvedTo(RAW_FIR)] annotation class AnotherAnnotation : R|kotlin/Annotation| { public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnotherAnnotation] constructor(): R|AnotherAnnotation| { LAZY_super } } - public final [ResolvedTo(STATUS)] enum class EnumClass : R|kotlin/Enum| { - private [ResolvedTo(STATUS)] [ContainingClassKey=EnumClass] constructor(): R|EnumClass| { + public? final? [ResolvedTo(RAW_FIR)] enum class EnumClass : R|kotlin/Enum| { + private [ResolvedTo(RAW_FIR)] [ContainingClassKey=EnumClass] constructor(): R|EnumClass| { LAZY_super|> } - public final static [ResolvedTo(STATUS)] [ContainingClassKey=EnumClass] enum entry First: R|EnumClass| - public final static [ResolvedTo(STATUS)] [ContainingClassKey=EnumClass] enum entry Second: R|EnumClass| - public final static [ResolvedTo(STATUS)] [ContainingClassKey=EnumClass] fun values(): R|kotlin/Array| { + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=EnumClass] enum entry First: R|EnumClass| + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=EnumClass] enum entry Second: R|EnumClass| + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=EnumClass] fun values(): R|kotlin/Array| { } - public final static [ResolvedTo(STATUS)] [ContainingClassKey=EnumClass] fun valueOf([ResolvedTo(STATUS)] value: R|kotlin/String|): R|EnumClass| { + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=EnumClass] fun valueOf([ResolvedTo(RAW_FIR)] value: R|kotlin/String|): R|EnumClass| { } - public final static [ResolvedTo(STATUS)] [ContainingClassKey=EnumClass] val entries: R|kotlin/enums/EnumEntries| - public [ResolvedTo(STATUS)] get(): R|kotlin/enums/EnumEntries| + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=EnumClass] val entries: R|kotlin/enums/EnumEntries| + public [ResolvedTo(RAW_FIR)] get(): R|kotlin/enums/EnumEntries| } public? final? [ResolvedTo(RAW_FIR)] annotation class Anno : R|kotlin/Annotation| { @@ -446,32 +401,32 @@ FILE: [ResolvedTo(IMPORTS)] annotationArgumentsMix.kt public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): EnumClass } - @R|kotlin/Deprecated|[Types](boo#()) @R|Anno|[Types](String(123), AnotherAnnotation#(), (Q|AnotherAnnotation|), Q|EnumClass|.R|/EnumClass.Second|) public final [ResolvedTo(CONTRACTS)] fun foo(): R|kotlin/Unit| { + @R|kotlin/Deprecated|[Types](boo#()) @R|Anno|[Types](LAZY_EXPRESSION, LAZY_EXPRESSION, LAZY_EXPRESSION, LAZY_EXPRESSION) public final [ResolvedTo(CONTRACTS)] fun foo(): R|kotlin/Unit| { } IMPLICIT_TYPES_BODY_RESOLVE: FILE: [ResolvedTo(IMPORTS)] annotationArgumentsMix.kt - public final [ResolvedTo(STATUS)] annotation class AnotherAnnotation : R|kotlin/Annotation| { + public? final? [ResolvedTo(RAW_FIR)] annotation class AnotherAnnotation : R|kotlin/Annotation| { public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnotherAnnotation] constructor(): R|AnotherAnnotation| { LAZY_super } } - public final [ResolvedTo(STATUS)] enum class EnumClass : R|kotlin/Enum| { - private [ResolvedTo(STATUS)] [ContainingClassKey=EnumClass] constructor(): R|EnumClass| { + public? final? [ResolvedTo(RAW_FIR)] enum class EnumClass : R|kotlin/Enum| { + private [ResolvedTo(RAW_FIR)] [ContainingClassKey=EnumClass] constructor(): R|EnumClass| { LAZY_super|> } - public final static [ResolvedTo(STATUS)] [ContainingClassKey=EnumClass] enum entry First: R|EnumClass| - public final static [ResolvedTo(STATUS)] [ContainingClassKey=EnumClass] enum entry Second: R|EnumClass| - public final static [ResolvedTo(STATUS)] [ContainingClassKey=EnumClass] fun values(): R|kotlin/Array| { + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=EnumClass] enum entry First: R|EnumClass| + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=EnumClass] enum entry Second: R|EnumClass| + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=EnumClass] fun values(): R|kotlin/Array| { } - public final static [ResolvedTo(STATUS)] [ContainingClassKey=EnumClass] fun valueOf([ResolvedTo(STATUS)] value: R|kotlin/String|): R|EnumClass| { + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=EnumClass] fun valueOf([ResolvedTo(RAW_FIR)] value: R|kotlin/String|): R|EnumClass| { } - public final static [ResolvedTo(STATUS)] [ContainingClassKey=EnumClass] val entries: R|kotlin/enums/EnumEntries| - public [ResolvedTo(STATUS)] get(): R|kotlin/enums/EnumEntries| + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=EnumClass] val entries: R|kotlin/enums/EnumEntries| + public [ResolvedTo(RAW_FIR)] get(): R|kotlin/enums/EnumEntries| } public? final? [ResolvedTo(RAW_FIR)] annotation class Anno : R|kotlin/Annotation| { @@ -492,7 +447,7 @@ FILE: [ResolvedTo(IMPORTS)] annotationArgumentsMix.kt public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): EnumClass } - @R|kotlin/Deprecated|[Types](boo#()) @R|Anno|[Types](String(123), AnotherAnnotation#(), (Q|AnotherAnnotation|), Q|EnumClass|.R|/EnumClass.Second|) public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] fun foo(): R|kotlin/Unit| { + @R|kotlin/Deprecated|[Types](boo#()) @R|Anno|[Types](LAZY_EXPRESSION, LAZY_EXPRESSION, LAZY_EXPRESSION, LAZY_EXPRESSION) public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] fun foo(): R|kotlin/Unit| { } ANNOTATIONS_ARGUMENTS_MAPPING: diff --git a/analysis/low-level-api-fir/testData/lazyResolve/annotationArgumentsMixScript.txt b/analysis/low-level-api-fir/testData/lazyResolve/annotationArgumentsMixScript.txt index b430ee0a2f6..1270f314688 100644 --- a/analysis/low-level-api-fir/testData/lazyResolve/annotationArgumentsMixScript.txt +++ b/analysis/low-level-api-fir/testData/lazyResolve/annotationArgumentsMixScript.txt @@ -422,87 +422,34 @@ FILE: [ResolvedTo(IMPORTS)] annotationArgumentsMixScript.kts @R|kotlin/Deprecated|[Types](boo#()) @R|Anno|[Types](LAZY_EXPRESSION, LAZY_EXPRESSION, LAZY_EXPRESSION, LAZY_EXPRESSION) public final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] fun foo(): R|kotlin/Unit| { LAZY_BLOCK } -ARGUMENTS_OF_ANNOTATIONS: -FILE: [ResolvedTo(IMPORTS)] annotationArgumentsMixScript.kts - context(