From 97956b43741ed12b47ef9701387f8e21883ea121 Mon Sep 17 00:00:00 2001 From: Dmitrii Gridin Date: Fri, 24 Nov 2023 17:17:24 +0100 Subject: [PATCH] [LL FIR] resolve propagated type annotations correctly This commit is Low Level FIR part of changes around propagated annotations (aka foreign annotations). It includes such changes as: * implicit type phase postpones foreign annotations resolution * annotation arguments are requests resolution for postponed annotations from implicit type phase as a pre-resolve step * body resolve phase just calls lazy resolution for foreign annotations on demand * isResolved check for type annotations to be sure that all annotations are resolved after annotation arguments phase ^KT-63042 Fixed ^KT-63681 Fixed --- .../LLFirAnnotationArgumentsLazyResolver.kt | 80 ++++++++++- .../fir/transformers/LLFirBodyLazyResolver.kt | 15 +++ .../LLFirImplicitTypesLazyResolver.kt | 80 ++++++++++- ...SymbolsForAnnotationResolutionAttribute.kt | 77 +++++++++++ .../api/fir/util/firCheckResolvedUtils.kt | 110 +++++++++++---- .../lambdaAsSAMInterfaceWithAnnotation.txt | 18 +-- ...calDelegatedPropertyWithPropagatedType.txt | 10 +- .../localPropertyWithPropagatedType.txt | 10 +- ...nonymousFunctionWithAnnotatedParameter.txt | 14 +- ...onymousFunctionWithAnnotatedParameter2.txt | 14 +- ...sFunctionWithAnnotatedParameter2Script.txt | 14 +- ...hAnnotatedParameterOnImplicitTypePhase.txt | 30 ++--- ...atedParameterOnImplicitTypePhaseScript.txt | 30 ++--- ...usFunctionWithAnnotatedParameterScript.txt | 14 +- ...implicitTypeWithInaccessibleAnnotation.txt | 34 ++--- .../impliciyTypeWithAnnotationOnFunction.txt | 34 ++--- .../impliciyTypeWithAnnotationOnProperty.txt | 42 +++--- .../properties/resultWithPropagatedType.txt | 38 +++--- .../scriptWithResultWithPropagatedType.txt | 38 +++--- ...ropagationToLocalMemberFunction.before.txt | 26 ++-- ...ationToLocalMemberFunction.lazyResolve.txt | 8 +- ...tionToLocalMemberFunctionScript.before.txt | 27 ++-- ...oLocalMemberFunctionScript.lazyResolve.txt | 9 +- .../delegateWithImplicitType.before.txt | 2 +- .../delegateWithImplicitType.lazyResolve.txt | 14 +- .../delegateWithImplicitTypeScript.before.txt | 2 +- ...gateWithImplicitTypeScript.lazyResolve.txt | 14 +- ...gateWithImplicitTypeUnavailable.before.txt | 2 +- ...ithImplicitTypeUnavailable.lazyResolve.txt | 14 +- ...thImplicitTypeUnavailableScript.before.txt | 2 +- ...licitTypeUnavailableScript.lazyResolve.txt | 14 +- .../propertyWithExplicitType.before.txt | 2 +- .../propertyWithExplicitType.lazyResolve.txt | 18 +-- .../propertyWithExplicitTypeScript.before.txt | 3 +- ...ertyWithExplicitTypeScript.lazyResolve.txt | 18 +-- ...pertyWithExplicitTypeUnavailable.after.txt | 2 +- ...ertyWithExplicitTypeUnavailable.before.txt | 2 +- ...ithExplicitTypeUnavailable.lazyResolve.txt | 42 +++--- ...ithExplicitTypeUnavailableScript.after.txt | 3 +- ...thExplicitTypeUnavailableScript.before.txt | 3 +- ...licitTypeUnavailableScript.lazyResolve.txt | 42 +++--- .../propertyWithImplicitType.after.txt | 2 +- .../propertyWithImplicitType.before.txt | 4 +- .../propertyWithImplicitType.lazyResolve.txt | 24 ++-- .../propertyWithImplicitTypeScript.after.txt | 3 +- .../propertyWithImplicitTypeScript.before.txt | 5 +- ...ertyWithImplicitTypeScript.lazyResolve.txt | 24 ++-- ...pertyWithImplicitTypeUnavailable.after.txt | 4 +- ...ertyWithImplicitTypeUnavailable.before.txt | 4 +- ...ithImplicitTypeUnavailable.lazyResolve.txt | 48 +++---- ...ithImplicitTypeUnavailableScript.after.txt | 5 +- ...thImplicitTypeUnavailableScript.before.txt | 5 +- ...licitTypeUnavailableScript.lazyResolve.txt | 48 +++---- .../scriptStatementLevel.before.txt | 126 +++++++++--------- .../scriptStatementLevel.lazyResolve.txt | 30 ++--- ...iptStatementLevelAsLastStatement.after.txt | 2 +- ...ptStatementLevelAsLastStatement.before.txt | 2 +- ...tementLevelAsLastStatement.lazyResolve.txt | 62 ++++----- .../function/implicitType.after.txt | 2 +- .../function/implicitType.before.txt | 2 +- .../function/implicitType.lazyResolve.txt | 34 ++--- .../function/implicitTypeScript.after.txt | 3 +- .../function/implicitTypeScript.before.txt | 3 +- .../implicitTypeScript.lazyResolve.txt | 34 ++--- .../implicitTypeUnavailable.after.txt | 2 +- .../implicitTypeUnavailable.before.txt | 2 +- .../implicitTypeUnavailable.lazyResolve.txt | 34 ++--- .../implicitTypeUnavailableScript.after.txt | 3 +- .../implicitTypeUnavailableScript.before.txt | 3 +- ...licitTypeUnavailableScript.lazyResolve.txt | 34 ++--- ...licitTypeUnavailableScript.lazyResolve.txt | 1 + .../function/multiDeclaration.after.txt | 2 +- .../function/multiDeclaration.before.txt | 2 +- .../function/multiDeclaration.lazyResolve.txt | 90 ++++++------- .../function/multiDeclarationScript.after.txt | 2 +- .../multiDeclarationScript.before.txt | 2 +- .../multiDeclarationScript.lazyResolve.txt | 90 ++++++------- ...unctionsImplicitBodyScript.lazyResolve.txt | 1 + ...ropagationToLocalMemberFunction.before.txt | 38 +++--- ...ationToLocalMemberFunction.lazyResolve.txt | 20 +-- ...oLocalMemberFunctionImplicitBody.after.txt | 2 +- ...LocalMemberFunctionImplicitBody.before.txt | 2 +- ...MemberFunctionImplicitBody.lazyResolve.txt | 42 +++--- ...MemberFunctionImplicitBodyScript.after.txt | 3 +- ...emberFunctionImplicitBodyScript.before.txt | 3 +- ...FunctionImplicitBodyScript.lazyResolve.txt | 35 ++--- ...tionToLocalMemberFunctionScript.before.txt | 23 ++-- ...oLocalMemberFunctionScript.lazyResolve.txt | 17 +-- ...thInaccessibleAnnotationArgument.after.txt | 2 +- ...hInaccessibleAnnotationArgument.before.txt | 2 +- ...cessibleAnnotationArgument.lazyResolve.txt | 44 +++--- ...cessibleAnnotationArgument.lazyResolve.txt | 28 ++-- .../initializer/classInitializer.before.txt | 26 ++-- .../classInitializer.lazyResolve.txt | 8 +- .../classInitializerScript.before.txt | 27 ++-- .../classInitializerScript.lazyResolve.txt | 9 +- .../property/implicitType.after.txt | 2 +- .../property/implicitType.before.txt | 2 +- .../property/implicitType.lazyResolve.txt | 42 +++--- .../property/implicitTypeScript.after.txt | 3 +- .../property/implicitTypeScript.before.txt | 3 +- .../implicitTypeScript.lazyResolve.txt | 42 +++--- .../implicitTypeUnavailable.after.txt | 2 +- .../implicitTypeUnavailable.before.txt | 2 +- .../implicitTypeUnavailable.lazyResolve.txt | 42 +++--- ...gatedPropertyWithPropagatedType.before.txt | 58 ++++---- ...PropertyWithPropagatedType.lazyResolve.txt | 16 +-- ...ropertyWithPropagatedTypeScript.before.txt | 58 ++++---- ...tyWithPropagatedTypeScript.lazyResolve.txt | 16 +-- ...tyWithPropagatedTypeUnavailable.before.txt | 58 ++++---- ...hPropagatedTypeUnavailable.lazyResolve.txt | 16 +-- ...PropagatedTypeUnavailableScript.before.txt | 58 ++++---- ...gatedTypeUnavailableScript.lazyResolve.txt | 16 +-- ...licitTypeUnavailableScript.lazyResolve.txt | 1 + ...localPropertyWithPropagatedType.before.txt | 28 ++-- ...PropertyWithPropagatedType.lazyResolve.txt | 16 +-- ...ropertyWithPropagatedTypeScript.before.txt | 28 ++-- ...tyWithPropagatedTypeScript.lazyResolve.txt | 16 +-- ...tyWithPropagatedTypeUnavailable.before.txt | 28 ++-- ...hPropagatedTypeUnavailable.lazyResolve.txt | 16 +-- ...opertiesImplicitBodyScript.lazyResolve.txt | 1 + ...tweenLocalMemberPropertiesScript.after.txt | 1 - ...weenLocalMemberPropertiesScript.before.txt | 1 - ...ropagationToLocalMemberProperty.before.txt | 100 +++++++------- ...ationToLocalMemberProperty.lazyResolve.txt | 34 ++--- ...oLocalMemberPropertyImplicitBody.after.txt | 2 +- ...LocalMemberPropertyImplicitBody.before.txt | 2 +- ...MemberPropertyImplicitBody.lazyResolve.txt | 70 +++++----- ...MemberPropertyImplicitBodyScript.after.txt | 3 +- ...emberPropertyImplicitBodyScript.before.txt | 2 +- ...PropertyImplicitBodyScript.lazyResolve.txt | 70 +++++----- ...tionToLocalMemberPropertyScript.before.txt | 100 +++++++------- ...oLocalMemberPropertyScript.lazyResolve.txt | 34 ++--- .../resultWithPropagatedType.after.txt | 3 +- .../resultWithPropagatedType.before.txt | 3 +- .../resultWithPropagatedType.lazyResolve.txt | 38 +++--- ...ultWithPropagatedTypeUnavailable.after.txt | 3 +- ...ltWithPropagatedTypeUnavailable.before.txt | 3 +- ...hPropagatedTypeUnavailable.lazyResolve.txt | 38 +++--- .../implicitFunction.before.txt | 2 +- .../implicitFunction.lazyResolve.txt | 14 +- .../implicitFunctionScript.before.txt | 2 +- .../implicitFunctionScript.lazyResolve.txt | 14 +- .../implicitFunctionUnavailable.before.txt | 2 +- ...mplicitFunctionUnavailable.lazyResolve.txt | 14 +- ...plicitFunctionUnavailableScript.before.txt | 2 +- ...tFunctionUnavailableScript.lazyResolve.txt | 14 +- .../implicitProperty.after.txt | 2 +- .../implicitProperty.before.txt | 2 +- .../implicitProperty.lazyResolve.txt | 30 ++--- .../implicitPropertyAndReceiver.before.txt | 2 +- ...mplicitPropertyAndReceiver.lazyResolve.txt | 30 ++--- ...plicitPropertyAndReceiverScript.before.txt | 3 +- ...tPropertyAndReceiverScript.lazyResolve.txt | 30 ++--- .../implicitPropertyScript.after.txt | 3 +- .../implicitPropertyScript.before.txt | 3 +- .../implicitPropertyScript.lazyResolve.txt | 30 ++--- .../implicitPropertyUnavailable.after.txt | 2 +- .../implicitPropertyUnavailable.before.txt | 2 +- ...mplicitPropertyUnavailable.lazyResolve.txt | 30 ++--- ...mplicitPropertyUnavailableScript.after.txt | 3 +- ...plicitPropertyUnavailableScript.before.txt | 3 +- ...tPropertyUnavailableScript.lazyResolve.txt | 30 ++--- .../getterWithImplicitReturnType.after.txt | 4 +- .../getterWithImplicitReturnType.before.txt | 4 +- ...tterWithImplicitReturnType.lazyResolve.txt | 20 +-- ...bstractBodyResolveTransformerDispatcher.kt | 8 +- 167 files changed, 1881 insertions(+), 1547 deletions(-) create mode 100644 analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/PostponedSymbolsForAnnotationResolutionAttribute.kt 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 index f02b7cb3d30..699879d8590 100644 --- 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 @@ -10,7 +10,7 @@ import org.jetbrains.kotlin.analysis.low.level.api.fir.api.throwUnexpectedFirEle 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.analysis.low.level.api.fir.sessions.llFirSession -import org.jetbrains.kotlin.analysis.low.level.api.fir.util.checkAnnotationArgumentsMappingIsResolved +import org.jetbrains.kotlin.analysis.low.level.api.fir.util.checkAnnotationsAreResolved import org.jetbrains.kotlin.analysis.low.level.api.fir.util.forEachDependentDeclaration import org.jetbrains.kotlin.fir.* import org.jetbrains.kotlin.fir.declarations.* @@ -23,6 +23,8 @@ 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.FirAnnotationArgumentsTransformer +import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol +import org.jetbrains.kotlin.fir.symbols.lazyResolveToPhase import org.jetbrains.kotlin.fir.types.FirTypeProjection import org.jetbrains.kotlin.fir.visitors.FirVisitorVoid import org.jetbrains.kotlin.fir.visitors.transformSingle @@ -41,7 +43,38 @@ internal object LLFirAnnotationArgumentsLazyResolver : LLFirLazyResolver(FirReso override fun phaseSpecificCheckIsResolved(target: FirElementWithResolveState) { if (target !is FirAnnotationContainer) return - checkAnnotationArgumentsMappingIsResolved(target) + checkAnnotationsAreResolved(target) + + when (target) { + is FirCallableDeclaration -> { + checkAnnotationsAreResolved(target, target.returnTypeRef) + val receiverParameter = target.receiverParameter + if (receiverParameter != null) { + checkAnnotationsAreResolved(receiverParameter) + checkAnnotationsAreResolved(target, receiverParameter.typeRef) + } + + for (contextReceiver in target.contextReceivers) { + checkAnnotationsAreResolved(target, contextReceiver.typeRef) + } + } + + is FirTypeParameter -> { + for (bound in target.bounds) { + checkAnnotationsAreResolved(target, bound) + } + } + + is FirClass -> { + for (typeRef in target.superTypeRefs) { + checkAnnotationsAreResolved(target, typeRef) + } + } + + is FirTypeAlias -> { + checkAnnotationsAreResolved(target, target.expandedTypeRef) + } + } } } @@ -57,6 +90,18 @@ private class LLFirAnnotationArgumentsTargetResolver( scopeSession, FirResolvePhase.ANNOTATION_ARGUMENTS, ) { + /** + * All foreign annotations have to be resolved before by [postponedSymbolsForAnnotationResolution] or [resolveDependencies] + * so there is no sense to override + * [transformForeignAnnotationCall][org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.FirAbstractBodyResolveTransformerDispatcher.transformForeignAnnotationCall] + * + * We can add additional [checkAnnotationCallIsResolved][org.jetbrains.kotlin.analysis.low.level.api.fir.util.checkAnnotationCallIsResolved], + * but this also doesn't make sense + * because we anyway will check all annotations during [LLFirAnnotationArgumentsLazyResolver.phaseSpecificCheckIsResolved] + * + * @see postponedSymbolsForAnnotationResolution + * @see org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.FirAbstractBodyResolveTransformerDispatcher.transformForeignAnnotationCall + */ override val transformer = FirAnnotationArgumentsTransformer( session, scopeSession, @@ -65,6 +110,27 @@ private class LLFirAnnotationArgumentsTargetResolver( firResolveContextCollector = firResolveContextCollector, ) + override fun doResolveWithoutLock(target: FirElementWithResolveState): Boolean { + if (target !is FirDeclaration) return false + + var processed = false + var symbolsToResolve: Collection>? = null + withReadLock(target) { + processed = true + symbolsToResolve = buildList { + target.forEachDeclarationWhichCanHavePostponedSymbols { + addAll(it.postponedSymbolsForAnnotationResolution.orEmpty()) + } + } + } + + // some other thread already resolved this element to this or upper phase + if (!processed) return true + symbolsToResolve?.forEach { it.lazyResolveToPhase(resolverPhase) } + + return false + } + override fun doLazyResolveUnderLock(target: FirElementWithResolveState) { resolveWithKeeper( target, @@ -74,6 +140,16 @@ private class LLFirAnnotationArgumentsTargetResolver( ) { transformAnnotations(target) } + + if (target is FirDeclaration) { + /** + * All symbols from [postponedSymbolsForAnnotationResolution] already processed during [doResolveWithoutLock], + * so we have to clean up the attribute + */ + target.forEachDeclarationWhichCanHavePostponedSymbols { + it.postponedSymbolsForAnnotationResolution = null + } + } } @Deprecated("Should never be called directly, only for override purposes, please use withRegularClass", level = DeprecationLevel.ERROR) diff --git a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/LLFirBodyLazyResolver.kt b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/LLFirBodyLazyResolver.kt index f7c98dd9290..697148367fc 100644 --- a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/LLFirBodyLazyResolver.kt +++ b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/LLFirBodyLazyResolver.kt @@ -45,6 +45,7 @@ import org.jetbrains.kotlin.fir.resolve.dfa.cfg.isUsedInControlFlowGraphBuilderF import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.FirBodyResolveTransformer import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.FirResolveContextCollector import org.jetbrains.kotlin.fir.resolve.transformers.contracts.FirContractsDslNames +import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol import org.jetbrains.kotlin.fir.symbols.lazyResolveToPhase import org.jetbrains.kotlin.fir.types.ConeKotlinType import org.jetbrains.kotlin.fir.types.isResolved @@ -105,6 +106,20 @@ private class LLFirBodyTargetResolver( ) { override val preserveCFGForClasses: Boolean get() = false override val buildCfgForFiles: Boolean get() = false + + /** + * It is safe to resolve foreign annotations on demand because the contract allows it + * ([annotation arguments][FirResolvePhase.ANNOTATION_ARGUMENTS] phase is less than [body][FirResolvePhase.BODY_RESOLVE] phase). + */ + override fun transformForeignAnnotationCall(symbol: FirBasedSymbol<*>, annotationCall: FirAnnotationCall): FirAnnotationCall { + // It is possible that some members of local classes will propagate annotations between each other, + // so we should just skip them, as they will be resolved anyway + if (symbol.cannotResolveAnnotationsOnDemand()) return annotationCall + + symbol.lazyResolveToPhase(FirResolvePhase.ANNOTATION_ARGUMENTS) + checkAnnotationCallIsResolved(symbol, annotationCall) + return annotationCall + } } /** diff --git a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/LLFirImplicitTypesLazyResolver.kt b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/LLFirImplicitTypesLazyResolver.kt index 5c05e7a995c..de4d3e63f89 100644 --- a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/LLFirImplicitTypesLazyResolver.kt +++ b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/LLFirImplicitTypesLazyResolver.kt @@ -15,12 +15,18 @@ import org.jetbrains.kotlin.fir.FirElementWithResolveState import org.jetbrains.kotlin.fir.FirFileAnnotationsContainer import org.jetbrains.kotlin.fir.FirSession import org.jetbrains.kotlin.fir.declarations.* +import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall import org.jetbrains.kotlin.fir.resolve.ScopeSession import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.FirImplicitAwareBodyResolveTransformer import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.FirResolveContextCollector import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.ImplicitBodyResolveComputationSession import org.jetbrains.kotlin.fir.scopes.callableCopySubstitutionForTypeUpdater +import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol +import org.jetbrains.kotlin.fir.symbols.impl.FirCallableSymbol import org.jetbrains.kotlin.fir.types.FirImplicitTypeRef +import org.jetbrains.kotlin.fir.util.setMultimapOf +import org.jetbrains.kotlin.fir.utils.exceptions.withFirSymbolEntry +import org.jetbrains.kotlin.utils.exceptions.errorWithAttachment internal object LLFirImplicitTypesLazyResolver : LLFirLazyResolver(FirResolvePhase.IMPLICIT_TYPES_BODY_RESOLVE) { override fun resolve( @@ -40,7 +46,64 @@ internal object LLFirImplicitTypesLazyResolver : LLFirLazyResolver(FirResolvePha } } -internal class LLImplicitBodyResolveComputationSession : ImplicitBodyResolveComputationSession() +internal class LLImplicitBodyResolveComputationSession : ImplicitBodyResolveComputationSession() { + /** + * The symbol on which foreign annotations will be postponed + * + * @see withAnchorForForeignAnnotations + * @see postponeForeignAnnotationResolution + */ + private var anchorForForeignAnnotations: FirCallableSymbol<*>? = null + + private inline fun withAnchorForForeignAnnotations(symbol: FirCallableSymbol<*>, action: () -> T): T { + val previousSymbol = anchorForForeignAnnotations + return try { + anchorForForeignAnnotations = symbol + action() + } finally { + anchorForForeignAnnotations = previousSymbol + } + } + + override fun executeTransformation(symbol: FirCallableSymbol<*>, transformation: () -> D): D { + // Do not store local declarations as we can postpone only non-local callables + return if (symbol.cannotResolveAnnotationsOnDemand()) { + transformation() + } else { + withAnchorForForeignAnnotations(symbol, transformation) + } + } + + private val postponedSymbols = setMultimapOf, FirBasedSymbol<*>>() + + /** + * Postpone the resolution request to [symbol] until [annotation arguments][FirResolvePhase.ANNOTATION_ARGUMENTS] phase + * of the declaration which is used this foreign annotation. + * + * @see postponedSymbols + */ + fun postponeForeignAnnotationResolution(symbol: FirBasedSymbol<*>) { + // We cannot resolve them on demand, so we shouldn't postpone them + if (symbol.cannotResolveAnnotationsOnDemand()) { + return + } + + val currentSymbol = anchorForForeignAnnotations ?: errorWithAttachment("Unexpected state: the current symbol have to be here") { + withFirSymbolEntry("symbol to postpone", symbol) + } + + postponedSymbols.put(currentSymbol, symbol) + } + + /** + * @return all symbols postponed with [postponeForeignAnnotationResolution] for the [target] element + * + * @see postponeForeignAnnotationResolution + */ + fun postponedSymbols(target: FirCallableDeclaration): Collection> { + return postponedSymbols[target.symbol] + } +} internal class LLFirImplicitBodyTargetResolver( target: LLFirResolveTarget, @@ -68,6 +131,10 @@ internal class LLFirImplicitBodyTargetResolver( ) { override val preserveCFGForClasses: Boolean get() = false override val buildCfgForFiles: Boolean get() = false + override fun transformForeignAnnotationCall(symbol: FirBasedSymbol<*>, annotationCall: FirAnnotationCall): FirAnnotationCall { + llImplicitBodyResolveComputationSession.postponeForeignAnnotationResolution(symbol) + return annotationCall + } } override fun doLazyResolveUnderLock(target: FirElementWithResolveState) { @@ -110,6 +177,17 @@ internal class LLFirImplicitBodyTargetResolver( } else -> throwUnexpectedFirElementError(target) } + + if (target is FirDeclaration) { + target.forEachDeclarationWhichCanHavePostponedSymbols(::publishPostponedSymbols) + } + } + + private fun publishPostponedSymbols(target: FirCallableDeclaration) { + val postponedSymbols = llImplicitBodyResolveComputationSession.postponedSymbols(target) + if (postponedSymbols.isNotEmpty()) { + target.postponedSymbolsForAnnotationResolution = postponedSymbols + } } override fun rawResolve(target: FirElementWithResolveState) { diff --git a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/PostponedSymbolsForAnnotationResolutionAttribute.kt b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/PostponedSymbolsForAnnotationResolutionAttribute.kt new file mode 100644 index 00000000000..18d9b2e84e3 --- /dev/null +++ b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/PostponedSymbolsForAnnotationResolutionAttribute.kt @@ -0,0 +1,77 @@ +/* + * 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.util.forEachDependentDeclaration +import org.jetbrains.kotlin.fir.declarations.FirCallableDeclaration +import org.jetbrains.kotlin.fir.declarations.FirDeclaration +import org.jetbrains.kotlin.fir.declarations.FirDeclarationDataKey +import org.jetbrains.kotlin.fir.declarations.FirDeclarationDataRegistry +import org.jetbrains.kotlin.fir.declarations.FirDeclarationOrigin +import org.jetbrains.kotlin.fir.declarations.FirScript +import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol +import org.jetbrains.kotlin.fir.symbols.impl.FirCallableSymbol + +private object PostponedSymbolsForAnnotationResolutionKey : FirDeclarationDataKey() + +/** + * During [implicit type][org.jetbrains.kotlin.fir.declarations.FirResolvePhase.IMPLICIT_TYPES_BODY_RESOLVE] phase we can + * meet [FirAnnotationCall][org.jetbrains.kotlin.fir.expressions.FirAnnotationCall]'s which do not belong to us + * (their [containingDeclarationSymbol][org.jetbrains.kotlin.fir.expressions.FirAnnotationCall.containingDeclarationSymbol] is not in our context). + * Such annotations can't be resolved in-place due to: + * * Contract violation + * ([implicit type][org.jetbrains.kotlin.fir.declarations.FirResolvePhase.IMPLICIT_TYPES_BODY_RESOLVE] phase is less than [annotation arguments][org.jetbrains.kotlin.fir.declarations.FirResolvePhase.ANNOTATION_ARGUMENTS] phase) + * + * * Concurrent modification issues. + * The same instance of a foreign annotation is shared at least between two declarations – the original declaration and this call site, + * so simultaneous modification of the annotation can lead to undefined behavior. + * + * * Wrong context on the call site. + * It is possible that the annotation can use arguments which are not visible from the call site. + * + * @return The collection of [FirBasedSymbol]s which have to be resolved on + * [annotation arguments][org.jetbrains.kotlin.fir.declarations.FirResolvePhase.ANNOTATION_ARGUMENTS] phase before [this] declaration. + * + * @see LLFirImplicitBodyTargetResolver + * @see LLFirAnnotationArgumentsTargetResolver + */ +internal var FirCallableDeclaration.postponedSymbolsForAnnotationResolution: Collection>? + by FirDeclarationDataRegistry.data(PostponedSymbolsForAnnotationResolutionKey) + +/** + * Some symbols shouldn't be processed as a regular annotation owner and should be just skipped. + * Example: + * ```kotlin + * fun foo() { + * class Local { + * fun localMemberWithoutType() = localMember() + * fun localMember(): @Anno Int = 0 + * } + * } + * ``` + * Here `localMember` is the owner of `Anno`, but we shouldn't process it as a usual non-local declaration, because + * this annotation cannot be leaked out of the body in not fully resolved state. + * + * @return true if this symbol shouldn't be processed as the owner of an annotation call + */ +internal fun FirBasedSymbol<*>.cannotResolveAnnotationsOnDemand(): Boolean { + return this is FirCallableSymbol<*> && callableId.isLocal && fir.origin != FirDeclarationOrigin.ScriptCustomization.ResultProperty +} + +/** + * Invoke [action] on each callable declaration that can have postponed symbols + * + * @see postponedSymbolsForAnnotationResolution + */ +internal fun FirDeclaration.forEachDeclarationWhichCanHavePostponedSymbols(action: (FirCallableDeclaration) -> Unit) { + when (this) { + is FirCallableDeclaration -> action(this) + is FirScript -> forEachDependentDeclaration { + it.forEachDeclarationWhichCanHavePostponedSymbols(action) + } + else -> {} + } +} \ No newline at end of file diff --git a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/util/firCheckResolvedUtils.kt b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/util/firCheckResolvedUtils.kt index ed543973601..05e3600f4ce 100644 --- a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/util/firCheckResolvedUtils.kt +++ b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/util/firCheckResolvedUtils.kt @@ -7,28 +7,37 @@ package org.jetbrains.kotlin.analysis.low.level.api.fir.util -import org.jetbrains.kotlin.utils.exceptions.ExceptionAttachmentBuilder -import org.jetbrains.kotlin.utils.exceptions.checkWithAttachment import org.jetbrains.kotlin.fir.FirAnnotationContainer +import org.jetbrains.kotlin.fir.FirElement import org.jetbrains.kotlin.fir.FirElementWithResolveState import org.jetbrains.kotlin.fir.contracts.FirLegacyRawContractDescription import org.jetbrains.kotlin.fir.contracts.FirResolvedContractDescription import org.jetbrains.kotlin.fir.contracts.impl.FirEmptyContractDescription import org.jetbrains.kotlin.fir.declarations.* -import org.jetbrains.kotlin.fir.declarations.utils.isActual import org.jetbrains.kotlin.fir.declarations.utils.isExpect +import org.jetbrains.kotlin.fir.expressions.FirAnnotation import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall import org.jetbrains.kotlin.fir.expressions.FirExpression import org.jetbrains.kotlin.fir.expressions.FirResolvable import org.jetbrains.kotlin.fir.expressions.UnresolvedExpressionTypeAccess import org.jetbrains.kotlin.fir.expressions.impl.FirResolvedArgumentList import org.jetbrains.kotlin.fir.references.* +import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.FirAbstractBodyResolveTransformerDispatcher +import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol import org.jetbrains.kotlin.fir.types.ConeKotlinType import org.jetbrains.kotlin.fir.types.FirImplicitTypeRef import org.jetbrains.kotlin.fir.types.FirResolvedTypeRef import org.jetbrains.kotlin.fir.types.FirTypeProjectionWithVariance import org.jetbrains.kotlin.fir.types.FirTypeRef +import org.jetbrains.kotlin.fir.types.coneType +import org.jetbrains.kotlin.fir.types.customAnnotations +import org.jetbrains.kotlin.fir.types.forEachType import org.jetbrains.kotlin.fir.utils.exceptions.withFirEntry +import org.jetbrains.kotlin.fir.utils.exceptions.withFirSymbolEntry +import org.jetbrains.kotlin.fir.visitors.FirVisitor +import org.jetbrains.kotlin.utils.exceptions.ExceptionAttachmentBuilder +import org.jetbrains.kotlin.utils.exceptions.checkWithAttachment +import org.jetbrains.kotlin.utils.exceptions.errorWithAttachment internal inline fun checkTypeRefIsResolved( typeRef: FirTypeRef, @@ -58,7 +67,7 @@ internal inline fun checkTypeRefIsResolved( internal inline fun checkExpressionTypeIsResolved( type: ConeKotlinType?, typeName: String, - owner: FirElementWithResolveState, + owner: FirElement, extraAttachment: ExceptionAttachmentBuilder.() -> Unit = {}, ) { checkWithAttachment( @@ -207,31 +216,78 @@ internal fun checkDeclarationStatusIsResolved(declaration: FirMemberDeclaration) } } -internal fun checkAnnotationArgumentsMappingIsResolved( - annotationContainer: T, -) where T : FirAnnotationContainer, T : FirElementWithResolveState { - for (annotation in annotationContainer.annotations) { - if (annotation is FirAnnotationCall) { - checkWithAttachment( - condition = annotation.argumentList is FirResolvedArgumentList, - message = { - buildString { - append("Expected ${FirResolvedArgumentList::class.simpleName}") - append(" for ${annotation::class.simpleName} of ${annotationContainer::class.simpleName}(${(annotationContainer as? FirDeclaration)?.origin})") - append(" but ${annotation.argumentList::class.simpleName} found") - } - } - ) { - withFirEntry("firAnnotation", annotation) - withFirEntry("firDeclaration", annotationContainer) - } - } +internal fun checkAnnotationsAreResolved(owner: FirAnnotationContainer, typeRef: FirTypeRef) { + checkWithAttachment(typeRef is FirResolvedTypeRef, { "Unexpected type: ${typeRef::class.simpleName}" }) { + withFirEntry("owner", owner) + withFirEntry("type", typeRef) + } - for (argument in annotation.argumentMapping.mapping.values) { - checkExpressionTypeIsResolved(argument.coneTypeOrNull, "annotation argument", annotationContainer) { - withFirEntry("firAnnotation", annotation) - withFirEntry("firArgument", argument) + typeRef.accept(AnnotationChecker, owner) +} + +internal fun FirAbstractBodyResolveTransformerDispatcher.checkAnnotationCallIsResolved( + symbol: FirBasedSymbol<*>, + annotationCall: FirAnnotationCall, +) { + val annotationContainer = context.containerIfAny ?: errorWithAttachment("Container cannot be found") { + withFirSymbolEntry("symbol", symbol) + withFirEntry("annotation", annotationCall) + } + + checkAnnotationIsResolved(annotationCall, annotationContainer) +} + +private object AnnotationChecker : FirVisitor() { + override fun visitAnnotation(annotation: FirAnnotation, data: FirAnnotationContainer) { + checkAnnotationIsResolved(annotation, data) + } + + override fun visitAnnotationCall(annotationCall: FirAnnotationCall, data: FirAnnotationContainer) { + checkAnnotationIsResolved(annotationCall, data) + } + + override fun visitResolvedTypeRef(resolvedTypeRef: FirResolvedTypeRef, data: FirAnnotationContainer) { + resolvedTypeRef.acceptChildren(this, data) + + resolvedTypeRef.coneType.forEachType { + it.type.attributes.customAnnotations.forEach { typeArgumentAnnotation -> + typeArgumentAnnotation.accept(this, data) } } } + + override fun visitElement(element: FirElement, data: FirAnnotationContainer) { + element.acceptChildren(this, data) + } +} + +internal fun checkAnnotationsAreResolved(annotationContainer: FirAnnotationContainer) { + for (annotation in annotationContainer.annotations) { + checkAnnotationIsResolved(annotation, annotationContainer) + } +} + +internal fun checkAnnotationIsResolved(annotation: FirAnnotation, annotationContainer: FirAnnotationContainer) { + if (annotation is FirAnnotationCall) { + checkWithAttachment( + condition = annotation.argumentList is FirResolvedArgumentList, + message = { + buildString { + append("Expected ${FirResolvedArgumentList::class.simpleName}") + append(" for ${annotation::class.simpleName} of ${annotationContainer::class.simpleName}(${(annotationContainer as? FirDeclaration)?.origin})") + append(" but ${annotation.argumentList::class.simpleName} found") + } + } + ) { + withFirEntry("firAnnotation", annotation) + withFirEntry("firDeclaration", annotationContainer) + } + } + + for (argument in annotation.argumentMapping.mapping.values) { + checkExpressionTypeIsResolved(argument.coneTypeOrNull, "annotation argument", annotationContainer) { + withFirEntry("firAnnotation", annotation) + withFirEntry("firArgument", argument) + } + } } diff --git a/analysis/low-level-api-fir/testData/getOrBuildFir/wholeDeclaration/lambdaAsSAMInterfaceWithAnnotation.txt b/analysis/low-level-api-fir/testData/getOrBuildFir/wholeDeclaration/lambdaAsSAMInterfaceWithAnnotation.txt index 5ce01f26f54..db89216820e 100644 --- a/analysis/low-level-api-fir/testData/getOrBuildFir/wholeDeclaration/lambdaAsSAMInterfaceWithAnnotation.txt +++ b/analysis/low-level-api-fir/testData/getOrBuildFir/wholeDeclaration/lambdaAsSAMInterfaceWithAnnotation.txt @@ -4,7 +4,7 @@ FIR source kind: KtRealSourceElementKind FIR element rendered: public final [ResolvedTo(BODY_RESOLVE)] fun resolveMe(): R|kotlin/Unit| { - R|foo/testMe|( = SAM([ResolvedTo(BODY_RESOLVE)] [MatchingParameterFunctionTypeKey=@R|foo/Anno|((String(testMe param type ), constant#)) foo/Foo] testMe@fun ([ResolvedTo(BODY_RESOLVE)] b: R|@R|foo/Anno|((String(foo param type ), constant#)) foo/Arg|): R|@R|foo/Anno|((String(foo return type ), constant#)) foo/Arg| { + R|foo/testMe|( = SAM([ResolvedTo(BODY_RESOLVE)] [MatchingParameterFunctionTypeKey=@R|foo/Anno|((String(testMe param type ), constant#)) foo/Foo] testMe@fun ([ResolvedTo(BODY_RESOLVE)] b: R|@R|foo/Anno|(position = (String(foo param type ), R|foo/constant|)) foo/Arg|): R|@R|foo/Anno|(position = (String(foo return type ), R|foo/constant|)) foo/Arg| { ^ R|/b| } )) @@ -20,25 +20,25 @@ FILE: [ResolvedTo(IMPORTS)] lambdaAsSAMInterfaceWithAnnotation.kt } } - @R|kotlin/annotation/Target|[CompilerRequiredAnnotations](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public? final? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] annotation class Anno : R|kotlin/Annotation| { - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=foo/Anno.position] position: String): R|foo/Anno| { + @R|kotlin/annotation/Target|[Types](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| { + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=foo/Anno.position] position: R|kotlin/String|): R|foo/Anno| { LAZY_super } - public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val position: String = R|/position| - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): String + public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val position: R|kotlin/String| = R|/position| + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/String| } - public? final? const [ResolvedTo(RAW_FIR)] val constant: = LAZY_EXPRESSION - public? [ResolvedTo(RAW_FIR)] get(): + public final const [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] val constant: R|kotlin/Int| = Int(0) + public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] get(): R|kotlin/Int| public abstract fun [ResolvedTo(STATUS)] interface Foo : R|kotlin/Any| { - public abstract [ResolvedTo(STATUS)] fun foo([ResolvedTo(STATUS)] a: R|@R|foo/Anno|((String(foo param type ), constant#)) foo/Arg|): R|@R|foo/Anno|((String(foo return type ), constant#)) foo/Arg| + public abstract [ResolvedTo(ANNOTATION_ARGUMENTS)] fun foo([ResolvedTo(ANNOTATION_ARGUMENTS)] a: R|@R|foo/Anno|(position = (String(foo param type ), R|foo/constant|)) foo/Arg|): R|@R|foo/Anno|(position = (String(foo return type ), R|foo/constant|)) foo/Arg| } public final [ResolvedTo(CONTRACTS)] fun testMe([ResolvedTo(CONTRACTS)] f: R|@R|foo/Anno|((String(testMe param type ), constant#)) foo/Foo|): R|kotlin/Unit| { } public final [ResolvedTo(BODY_RESOLVE)] fun resolveMe(): R|kotlin/Unit| { - R|foo/testMe|( = SAM([ResolvedTo(BODY_RESOLVE)] [MatchingParameterFunctionTypeKey=@R|foo/Anno|((String(testMe param type ), constant#)) foo/Foo] testMe@fun ([ResolvedTo(BODY_RESOLVE)] b: R|@R|foo/Anno|((String(foo param type ), constant#)) foo/Arg|): R|@R|foo/Anno|((String(foo return type ), constant#)) foo/Arg| { + R|foo/testMe|( = SAM([ResolvedTo(BODY_RESOLVE)] [MatchingParameterFunctionTypeKey=@R|foo/Anno|((String(testMe param type ), constant#)) foo/Foo] testMe@fun ([ResolvedTo(BODY_RESOLVE)] b: R|@R|foo/Anno|(position = (String(foo param type ), R|foo/constant|)) foo/Arg|): R|@R|foo/Anno|(position = (String(foo return type ), R|foo/constant|)) foo/Arg| { ^ R|/b| } )) diff --git a/analysis/low-level-api-fir/testData/getOrBuildFir/wholeDeclaration/localDelegatedPropertyWithPropagatedType.txt b/analysis/low-level-api-fir/testData/getOrBuildFir/wholeDeclaration/localDelegatedPropertyWithPropagatedType.txt index bbf151de023..49667c68fe7 100644 --- a/analysis/low-level-api-fir/testData/getOrBuildFir/wholeDeclaration/localDelegatedPropertyWithPropagatedType.txt +++ b/analysis/low-level-api-fir/testData/getOrBuildFir/wholeDeclaration/localDelegatedPropertyWithPropagatedType.txt @@ -3,7 +3,7 @@ FIR element: FirPropertyImpl FIR source kind: KtRealSourceElementKind FIR element rendered: -@R|foo/Anno|[Types](position = (String(property ), R|foo/secondConstant|)) [ResolvedTo(BODY_RESOLVE)] lval localProperty: R|@R|foo/Anno|((String(return type: ), constant#)) kotlin/collections/List<@R|foo/Anno|((String(nested return type: ), constant#)) kotlin/collections/Collection<@R|foo/Anno|((String(nested nested return type: ), constant#)) kotlin/String>>|by R|kotlin/lazy|(String(return type: ), constant#)) kotlin/collections/List<@R|foo/Anno|((String(nested return type: ), constant#)) kotlin/collections/Collection<@R|foo/Anno|((String(nested nested return type: ), constant#)) kotlin/String>>|>( = [ResolvedTo(BODY_RESOLVE)] [MatchingParameterFunctionTypeKey=kotlin/Function0] lazy@fun (): R|@R|foo/Anno|((String(return type: ), constant#)) kotlin/collections/List<@R|foo/Anno|((String(nested return type: ), constant#)) kotlin/collections/Collection<@R|foo/Anno|((String(nested nested return type: ), constant#)) kotlin/String>>| { +@R|foo/Anno|[Types](position = (String(property ), R|foo/secondConstant|)) [ResolvedTo(BODY_RESOLVE)] lval localProperty: R|@R|foo/Anno|(position = (String(return type: ), R|foo/constant|)) kotlin/collections/List<@R|foo/Anno|(position = (String(nested return type: ), R|foo/constant|)) kotlin/collections/Collection<@R|foo/Anno|(position = (String(nested nested return type: ), R|foo/constant|)) kotlin/String>>|by R|kotlin/lazy|(String(return type: ), R|foo/constant|)) kotlin/collections/List<@R|foo/Anno|(position = (String(nested return type: ), R|foo/constant|)) kotlin/collections/Collection<@R|foo/Anno|(position = (String(nested nested return type: ), R|foo/constant|)) kotlin/String>>|>( = [ResolvedTo(BODY_RESOLVE)] [MatchingParameterFunctionTypeKey=kotlin/Function0] lazy@fun (): R|@R|foo/Anno|(position = (String(return type: ), R|foo/constant|)) kotlin/collections/List<@R|foo/Anno|(position = (String(nested return type: ), R|foo/constant|)) kotlin/collections/Collection<@R|foo/Anno|(position = (String(nested nested return type: ), R|foo/constant|)) kotlin/String>>| { ^ R|foo/explicitType|() } ) @@ -21,13 +21,13 @@ FILE: [ResolvedTo(IMPORTS)] localDelegatedPropertyWithPropagatedType.kt public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/String| } - public? final? const [ResolvedTo(RAW_FIR)] val constant: = LAZY_EXPRESSION - public? [ResolvedTo(RAW_FIR)] get(): - public final [ResolvedTo(CONTRACTS)] fun explicitType(): R|@R|foo/Anno|((String(return type: ), constant#)) kotlin/collections/List<@R|foo/Anno|((String(nested return type: ), constant#)) kotlin/collections/Collection<@R|foo/Anno|((String(nested nested return type: ), constant#)) kotlin/String>>| { + public final const [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] val constant: R|kotlin/Int| = Int(0) + public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] get(): R|kotlin/Int| + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] fun explicitType(): R|@R|foo/Anno|(position = (String(return type: ), R|foo/constant|)) kotlin/collections/List<@R|foo/Anno|(position = (String(nested return type: ), R|foo/constant|)) kotlin/collections/Collection<@R|foo/Anno|(position = (String(nested nested return type: ), R|foo/constant|)) kotlin/String>>| { ^explicitType IntegerLiteral(0) } public final [ResolvedTo(BODY_RESOLVE)] fun resolveMe(): R|kotlin/Unit| { - @R|foo/Anno|[Types](position = (String(property ), R|foo/secondConstant|)) [ResolvedTo(BODY_RESOLVE)] lval localProperty: R|@R|foo/Anno|((String(return type: ), constant#)) kotlin/collections/List<@R|foo/Anno|((String(nested return type: ), constant#)) kotlin/collections/Collection<@R|foo/Anno|((String(nested nested return type: ), constant#)) kotlin/String>>|by R|kotlin/lazy|(String(return type: ), constant#)) kotlin/collections/List<@R|foo/Anno|((String(nested return type: ), constant#)) kotlin/collections/Collection<@R|foo/Anno|((String(nested nested return type: ), constant#)) kotlin/String>>|>( = [ResolvedTo(BODY_RESOLVE)] [MatchingParameterFunctionTypeKey=kotlin/Function0] lazy@fun (): R|@R|foo/Anno|((String(return type: ), constant#)) kotlin/collections/List<@R|foo/Anno|((String(nested return type: ), constant#)) kotlin/collections/Collection<@R|foo/Anno|((String(nested nested return type: ), constant#)) kotlin/String>>| { + @R|foo/Anno|[Types](position = (String(property ), R|foo/secondConstant|)) [ResolvedTo(BODY_RESOLVE)] lval localProperty: R|@R|foo/Anno|(position = (String(return type: ), R|foo/constant|)) kotlin/collections/List<@R|foo/Anno|(position = (String(nested return type: ), R|foo/constant|)) kotlin/collections/Collection<@R|foo/Anno|(position = (String(nested nested return type: ), R|foo/constant|)) kotlin/String>>|by R|kotlin/lazy|(String(return type: ), R|foo/constant|)) kotlin/collections/List<@R|foo/Anno|(position = (String(nested return type: ), R|foo/constant|)) kotlin/collections/Collection<@R|foo/Anno|(position = (String(nested nested return type: ), R|foo/constant|)) kotlin/String>>|>( = [ResolvedTo(BODY_RESOLVE)] [MatchingParameterFunctionTypeKey=kotlin/Function0] lazy@fun (): R|@R|foo/Anno|(position = (String(return type: ), R|foo/constant|)) kotlin/collections/List<@R|foo/Anno|(position = (String(nested return type: ), R|foo/constant|)) kotlin/collections/Collection<@R|foo/Anno|(position = (String(nested nested return type: ), R|foo/constant|)) kotlin/String>>| { ^ R|foo/explicitType|() } ) diff --git a/analysis/low-level-api-fir/testData/getOrBuildFir/wholeDeclaration/localPropertyWithPropagatedType.txt b/analysis/low-level-api-fir/testData/getOrBuildFir/wholeDeclaration/localPropertyWithPropagatedType.txt index 1456d953ad6..37b154b2da8 100644 --- a/analysis/low-level-api-fir/testData/getOrBuildFir/wholeDeclaration/localPropertyWithPropagatedType.txt +++ b/analysis/low-level-api-fir/testData/getOrBuildFir/wholeDeclaration/localPropertyWithPropagatedType.txt @@ -3,7 +3,7 @@ FIR element: FirPropertyImpl FIR source kind: KtRealSourceElementKind FIR element rendered: -@R|foo/Anno|[Types](position = (String(property ), R|foo/secondConstant|)) [ResolvedTo(BODY_RESOLVE)] lval localProperty: R|@R|foo/Anno|((String(return type: ), constant#)) kotlin/collections/List<@R|foo/Anno|((String(nested return type: ), constant#)) kotlin/collections/Collection<@R|foo/Anno|((String(nested nested return type: ), constant#)) kotlin/String>>| = R|foo/explicitType|() +@R|foo/Anno|[Types](position = (String(property ), R|foo/secondConstant|)) [ResolvedTo(BODY_RESOLVE)] lval localProperty: R|@R|foo/Anno|(position = (String(return type: ), R|foo/constant|)) kotlin/collections/List<@R|foo/Anno|(position = (String(nested return type: ), R|foo/constant|)) kotlin/collections/Collection<@R|foo/Anno|(position = (String(nested nested return type: ), R|foo/constant|)) kotlin/String>>| = R|foo/explicitType|() FIR FILE: FILE: [ResolvedTo(IMPORTS)] localPropertyWithPropagatedType.kt @@ -18,13 +18,13 @@ FILE: [ResolvedTo(IMPORTS)] localPropertyWithPropagatedType.kt public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/String| } - public? final? const [ResolvedTo(RAW_FIR)] val constant: = LAZY_EXPRESSION - public? [ResolvedTo(RAW_FIR)] get(): - public final [ResolvedTo(CONTRACTS)] fun explicitType(): R|@R|foo/Anno|((String(return type: ), constant#)) kotlin/collections/List<@R|foo/Anno|((String(nested return type: ), constant#)) kotlin/collections/Collection<@R|foo/Anno|((String(nested nested return type: ), constant#)) kotlin/String>>| { + public final const [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] val constant: R|kotlin/Int| = Int(0) + public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] get(): R|kotlin/Int| + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] fun explicitType(): R|@R|foo/Anno|(position = (String(return type: ), R|foo/constant|)) kotlin/collections/List<@R|foo/Anno|(position = (String(nested return type: ), R|foo/constant|)) kotlin/collections/Collection<@R|foo/Anno|(position = (String(nested nested return type: ), R|foo/constant|)) kotlin/String>>| { ^explicitType IntegerLiteral(0) } public final [ResolvedTo(BODY_RESOLVE)] fun resolveMe(): R|kotlin/Unit| { - @R|foo/Anno|[Types](position = (String(property ), R|foo/secondConstant|)) [ResolvedTo(BODY_RESOLVE)] lval localProperty: R|@R|foo/Anno|((String(return type: ), constant#)) kotlin/collections/List<@R|foo/Anno|((String(nested return type: ), constant#)) kotlin/collections/Collection<@R|foo/Anno|((String(nested nested return type: ), constant#)) kotlin/String>>| = R|foo/explicitType|() + @R|foo/Anno|[Types](position = (String(property ), R|foo/secondConstant|)) [ResolvedTo(BODY_RESOLVE)] lval localProperty: R|@R|foo/Anno|(position = (String(return type: ), R|foo/constant|)) kotlin/collections/List<@R|foo/Anno|(position = (String(nested return type: ), R|foo/constant|)) kotlin/collections/Collection<@R|foo/Anno|(position = (String(nested nested return type: ), R|foo/constant|)) kotlin/String>>| = R|foo/explicitType|() } public final const [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] val secondConstant: R|kotlin/String| = String(str) public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] get(): R|kotlin/String| \ No newline at end of file diff --git a/analysis/low-level-api-fir/testData/lazyResolve/anonymousFunctionWithAnnotatedParameter.txt b/analysis/low-level-api-fir/testData/lazyResolve/anonymousFunctionWithAnnotatedParameter.txt index da6b0a0cb8e..d3249649671 100644 --- a/analysis/low-level-api-fir/testData/lazyResolve/anonymousFunctionWithAnnotatedParameter.txt +++ b/analysis/low-level-api-fir/testData/lazyResolve/anonymousFunctionWithAnnotatedParameter.txt @@ -191,22 +191,22 @@ FILE: [ResolvedTo(IMPORTS)] anonymousFunctionWithAnnotatedParameter.kt BODY_RESOLVE: FILE: [ResolvedTo(IMPORTS)] anonymousFunctionWithAnnotatedParameter.kt - @R|kotlin/annotation/Target|[CompilerRequiredAnnotations](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public? final? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] annotation class Anno : R|kotlin/Annotation| { - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Anno.message] message: String): R|Anno| { + @R|kotlin/annotation/Target|[Types](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| { + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Anno.message] message: R|kotlin/String|): R|Anno| { LAZY_super } - public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val message: String = R|/message| - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): String + public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val message: R|kotlin/String| = R|/message| + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/String| } - public final [ResolvedTo(CONTRACTS)] val nullablePropertyWithAnnotatedType: R|@R|Anno|(String(outer)) kotlin/collections/List<@R|Anno|(String(middle)) kotlin/collections/List<@R|Anno|(String(inner)) kotlin/Int>>?| - public [ResolvedTo(CONTRACTS)] get(): R|@R|Anno|(String(outer)) kotlin/collections/List<@R|Anno|(String(middle)) kotlin/collections/List<@R|Anno|(String(inner)) kotlin/Int>>?| { + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] val nullablePropertyWithAnnotatedType: R|@R|Anno|(message = String(outer)) kotlin/collections/List<@R|Anno|(message = String(middle)) kotlin/collections/List<@R|Anno|(message = String(inner)) kotlin/Int>>?| + public [ResolvedTo(ANNOTATION_ARGUMENTS)] get(): R|@R|Anno|(message = String(outer)) kotlin/collections/List<@R|Anno|(message = String(middle)) kotlin/collections/List<@R|Anno|(message = String(inner)) kotlin/Int>>?| { ^ Null(null) } public final [ResolvedTo(BODY_RESOLVE)] val propertyToResolve: R|kotlin/String| public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/String| { - ^ R|/nullablePropertyWithAnnotatedType|?.{ $subj$.R|kotlin/let|>|, R|kotlin/String|>( = [ResolvedTo(BODY_RESOLVE)] [MatchingParameterFunctionTypeKey=kotlin/Function1] let@fun ([ResolvedTo(BODY_RESOLVE)] it: R|@R|Anno|(String(outer)) kotlin/collections/List<@R|Anno|(String(middle)) kotlin/collections/List<@R|Anno|(String(inner)) kotlin/Int>>|): R|kotlin/String| { + ^ R|/nullablePropertyWithAnnotatedType|?.{ $subj$.R|kotlin/let|>|, R|kotlin/String|>( = [ResolvedTo(BODY_RESOLVE)] [MatchingParameterFunctionTypeKey=kotlin/Function1] let@fun ([ResolvedTo(BODY_RESOLVE)] it: R|@R|Anno|(message = String(outer)) kotlin/collections/List<@R|Anno|(message = String(middle)) kotlin/collections/List<@R|Anno|(message = String(inner)) kotlin/Int>>|): R|kotlin/String| { ^ (String( (), R|/it|, String())) } ) } ?: String() diff --git a/analysis/low-level-api-fir/testData/lazyResolve/anonymousFunctionWithAnnotatedParameter2.txt b/analysis/low-level-api-fir/testData/lazyResolve/anonymousFunctionWithAnnotatedParameter2.txt index a2306404043..bb9e16872bd 100644 --- a/analysis/low-level-api-fir/testData/lazyResolve/anonymousFunctionWithAnnotatedParameter2.txt +++ b/analysis/low-level-api-fir/testData/lazyResolve/anonymousFunctionWithAnnotatedParameter2.txt @@ -191,22 +191,22 @@ FILE: [ResolvedTo(IMPORTS)] anonymousFunctionWithAnnotatedParameter2.kt BODY_RESOLVE: FILE: [ResolvedTo(IMPORTS)] anonymousFunctionWithAnnotatedParameter2.kt - @R|kotlin/annotation/Target|[CompilerRequiredAnnotations](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public? final? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] annotation class Anno : R|kotlin/Annotation| { - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Anno.message] message: String): R|Anno| { + @R|kotlin/annotation/Target|[Types](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| { + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Anno.message] message: R|kotlin/String|): R|Anno| { LAZY_super } - public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val message: String = R|/message| - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): String + public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val message: R|kotlin/String| = R|/message| + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/String| } - public final [ResolvedTo(CONTRACTS)] val nullablePropertyWithAnnotatedType: R|@R|Anno|(String(outer)) kotlin/collections/List<@R|Anno|(String(middle)) kotlin/collections/List<@R|Anno|(String(inner)) kotlin/Int>>?| - public [ResolvedTo(CONTRACTS)] get(): R|@R|Anno|(String(outer)) kotlin/collections/List<@R|Anno|(String(middle)) kotlin/collections/List<@R|Anno|(String(inner)) kotlin/Int>>?| { + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] val nullablePropertyWithAnnotatedType: R|@R|Anno|(message = String(outer)) kotlin/collections/List<@R|Anno|(message = String(middle)) kotlin/collections/List<@R|Anno|(message = String(inner)) kotlin/Int>>?| + public [ResolvedTo(ANNOTATION_ARGUMENTS)] get(): R|@R|Anno|(message = String(outer)) kotlin/collections/List<@R|Anno|(message = String(middle)) kotlin/collections/List<@R|Anno|(message = String(inner)) kotlin/Int>>?| { ^ Null(null) } public final [ResolvedTo(BODY_RESOLVE)] val propertyToResolve: R|kotlin/String| public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/String| { - ^ R|/nullablePropertyWithAnnotatedType|.R|kotlin/let|>?|, R|kotlin/String|>( = [ResolvedTo(BODY_RESOLVE)] [MatchingParameterFunctionTypeKey=kotlin/Function1] let@fun ([ResolvedTo(BODY_RESOLVE)] it: R|@R|Anno|(String(outer)) kotlin/collections/List<@R|Anno|(String(middle)) kotlin/collections/List<@R|Anno|(String(inner)) kotlin/Int>>?|): R|kotlin/String| { + ^ R|/nullablePropertyWithAnnotatedType|.R|kotlin/let|>?|, R|kotlin/String|>( = [ResolvedTo(BODY_RESOLVE)] [MatchingParameterFunctionTypeKey=kotlin/Function1] let@fun ([ResolvedTo(BODY_RESOLVE)] it: R|@R|Anno|(message = String(outer)) kotlin/collections/List<@R|Anno|(message = String(middle)) kotlin/collections/List<@R|Anno|(message = String(inner)) kotlin/Int>>?|): R|kotlin/String| { ^ (String( (), R|/it|, String())) } ) diff --git a/analysis/low-level-api-fir/testData/lazyResolve/anonymousFunctionWithAnnotatedParameter2Script.txt b/analysis/low-level-api-fir/testData/lazyResolve/anonymousFunctionWithAnnotatedParameter2Script.txt index 993c147b388..4b2e8b4a65f 100644 --- a/analysis/low-level-api-fir/testData/lazyResolve/anonymousFunctionWithAnnotatedParameter2Script.txt +++ b/analysis/low-level-api-fir/testData/lazyResolve/anonymousFunctionWithAnnotatedParameter2Script.txt @@ -272,24 +272,24 @@ FILE: [ResolvedTo(IMPORTS)] anonymousFunctionWithAnnotatedParameter2Script.kts SCRIPT: [ResolvedTo(TYPES)] [ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array| - @R|kotlin/annotation/Target|[CompilerRequiredAnnotations](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public? final? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] annotation class Anno : R|kotlin/Annotation| { - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Anno.message] message: String): R|Anno| { + @R|kotlin/annotation/Target|[Types](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| { + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Anno.message] message: R|kotlin/String|): R|Anno| { LAZY_super } - public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val message: String = R|/message| - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): String + public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val message: R|kotlin/String| = R|/message| + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/String| } - public final [ResolvedTo(CONTRACTS)] val nullablePropertyWithAnnotatedType: R|@R|Anno|(String(outer)) kotlin/collections/List<@R|Anno|(String(middle)) kotlin/collections/List<@R|Anno|(String(inner)) kotlin/Int>>?| - public [ResolvedTo(CONTRACTS)] get(): R|@R|Anno|(String(outer)) kotlin/collections/List<@R|Anno|(String(middle)) kotlin/collections/List<@R|Anno|(String(inner)) kotlin/Int>>?| { + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] val nullablePropertyWithAnnotatedType: R|@R|Anno|(message = String(outer)) kotlin/collections/List<@R|Anno|(message = String(middle)) kotlin/collections/List<@R|Anno|(message = String(inner)) kotlin/Int>>?| + public [ResolvedTo(ANNOTATION_ARGUMENTS)] get(): R|@R|Anno|(message = String(outer)) kotlin/collections/List<@R|Anno|(message = String(middle)) kotlin/collections/List<@R|Anno|(message = String(inner)) kotlin/Int>>?| { ^ Null(null) } public final [ResolvedTo(BODY_RESOLVE)] val propertyToResolve: R|kotlin/String| public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/String| { - ^ R|/nullablePropertyWithAnnotatedType|.R|kotlin/let|>?|, R|kotlin/String|>( = [ResolvedTo(BODY_RESOLVE)] [MatchingParameterFunctionTypeKey=kotlin/Function1] let@fun ([ResolvedTo(BODY_RESOLVE)] it: R|@R|Anno|(String(outer)) kotlin/collections/List<@R|Anno|(String(middle)) kotlin/collections/List<@R|Anno|(String(inner)) kotlin/Int>>?|): R|kotlin/String| { + ^ R|/nullablePropertyWithAnnotatedType|.R|kotlin/let|>?|, R|kotlin/String|>( = [ResolvedTo(BODY_RESOLVE)] [MatchingParameterFunctionTypeKey=kotlin/Function1] let@fun ([ResolvedTo(BODY_RESOLVE)] it: R|@R|Anno|(message = String(outer)) kotlin/collections/List<@R|Anno|(message = String(middle)) kotlin/collections/List<@R|Anno|(message = String(inner)) kotlin/Int>>?|): R|kotlin/String| { ^ (String( (), R|/it|, String())) } ) diff --git a/analysis/low-level-api-fir/testData/lazyResolve/anonymousFunctionWithAnnotatedParameterOnImplicitTypePhase.txt b/analysis/low-level-api-fir/testData/lazyResolve/anonymousFunctionWithAnnotatedParameterOnImplicitTypePhase.txt index 4a7547b3a04..a0b851e2d28 100644 --- a/analysis/low-level-api-fir/testData/lazyResolve/anonymousFunctionWithAnnotatedParameterOnImplicitTypePhase.txt +++ b/analysis/low-level-api-fir/testData/lazyResolve/anonymousFunctionWithAnnotatedParameterOnImplicitTypePhase.txt @@ -162,7 +162,7 @@ FILE: [ResolvedTo(IMPORTS)] anonymousFunctionWithAnnotatedParameterOnImplicitTyp public [ResolvedTo(CONTRACTS)] get(): R|@R|Anno|(String(str)) kotlin/String?| { ^ Null(null) } - public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] val propertyToResolve: R|kotlin/String| + public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] [PostponedSymbolsForAnnotationResolutionKey=[FirPropertySymbol /nullablePropertyWithAnnotatedType]] val propertyToResolve: R|kotlin/String| public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] get(): R|kotlin/String| { ^ R|/nullablePropertyWithAnnotatedType|?.{ $subj$.R|kotlin/let|( = [ResolvedTo(RAW_FIR)] [MatchingParameterFunctionTypeKey=kotlin/Function1] let@fun ([ResolvedTo(BODY_RESOLVE)] it: R|@R|Anno|(String(str)) kotlin/String|): R|kotlin/String| { ^ (String( (), R|/it|, String())) @@ -172,22 +172,22 @@ FILE: [ResolvedTo(IMPORTS)] anonymousFunctionWithAnnotatedParameterOnImplicitTyp ANNOTATION_ARGUMENTS: FILE: [ResolvedTo(IMPORTS)] anonymousFunctionWithAnnotatedParameterOnImplicitTypePhase.kt - @R|kotlin/annotation/Target|[CompilerRequiredAnnotations](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public? final? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] annotation class Anno : R|kotlin/Annotation| { - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Anno.message] message: String): R|Anno| { + @R|kotlin/annotation/Target|[Types](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| { + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Anno.message] message: R|kotlin/String|): R|Anno| { LAZY_super } - public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val message: String = R|/message| - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): String + public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val message: R|kotlin/String| = R|/message| + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/String| } - public final [ResolvedTo(CONTRACTS)] val nullablePropertyWithAnnotatedType: R|@R|Anno|(String(str)) kotlin/String?| - public [ResolvedTo(CONTRACTS)] get(): R|@R|Anno|(String(str)) kotlin/String?| { + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] val nullablePropertyWithAnnotatedType: R|@R|Anno|(message = String(str)) kotlin/String?| + public [ResolvedTo(ANNOTATION_ARGUMENTS)] get(): R|@R|Anno|(message = String(str)) kotlin/String?| { ^ Null(null) } public final [ResolvedTo(ANNOTATION_ARGUMENTS)] val propertyToResolve: R|kotlin/String| public [ResolvedTo(ANNOTATION_ARGUMENTS)] get(): R|kotlin/String| { - ^ R|/nullablePropertyWithAnnotatedType|?.{ $subj$.R|kotlin/let|( = [ResolvedTo(RAW_FIR)] [MatchingParameterFunctionTypeKey=kotlin/Function1] let@fun ([ResolvedTo(BODY_RESOLVE)] it: R|@R|Anno|(String(str)) kotlin/String|): R|kotlin/String| { + ^ R|/nullablePropertyWithAnnotatedType|?.{ $subj$.R|kotlin/let|( = [ResolvedTo(RAW_FIR)] [MatchingParameterFunctionTypeKey=kotlin/Function1] let@fun ([ResolvedTo(BODY_RESOLVE)] it: R|@R|Anno|(message = String(str)) kotlin/String|): R|kotlin/String| { ^ (String( (), R|/it|, String())) } ) } ?: String() @@ -195,22 +195,22 @@ FILE: [ResolvedTo(IMPORTS)] anonymousFunctionWithAnnotatedParameterOnImplicitTyp BODY_RESOLVE: FILE: [ResolvedTo(IMPORTS)] anonymousFunctionWithAnnotatedParameterOnImplicitTypePhase.kt - @R|kotlin/annotation/Target|[CompilerRequiredAnnotations](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public? final? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] annotation class Anno : R|kotlin/Annotation| { - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Anno.message] message: String): R|Anno| { + @R|kotlin/annotation/Target|[Types](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| { + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Anno.message] message: R|kotlin/String|): R|Anno| { LAZY_super } - public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val message: String = R|/message| - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): String + public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val message: R|kotlin/String| = R|/message| + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/String| } - public final [ResolvedTo(CONTRACTS)] val nullablePropertyWithAnnotatedType: R|@R|Anno|(String(str)) kotlin/String?| - public [ResolvedTo(CONTRACTS)] get(): R|@R|Anno|(String(str)) kotlin/String?| { + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] val nullablePropertyWithAnnotatedType: R|@R|Anno|(message = String(str)) kotlin/String?| + public [ResolvedTo(ANNOTATION_ARGUMENTS)] get(): R|@R|Anno|(message = String(str)) kotlin/String?| { ^ Null(null) } public final [ResolvedTo(BODY_RESOLVE)] val propertyToResolve: R|kotlin/String| public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/String| { - ^ R|/nullablePropertyWithAnnotatedType|?.{ $subj$.R|kotlin/let|( = [ResolvedTo(BODY_RESOLVE)] [MatchingParameterFunctionTypeKey=kotlin/Function1] let@fun ([ResolvedTo(BODY_RESOLVE)] it: R|@R|Anno|(String(str)) kotlin/String|): R|kotlin/String| { + ^ R|/nullablePropertyWithAnnotatedType|?.{ $subj$.R|kotlin/let|( = [ResolvedTo(BODY_RESOLVE)] [MatchingParameterFunctionTypeKey=kotlin/Function1] let@fun ([ResolvedTo(BODY_RESOLVE)] it: R|@R|Anno|(message = String(str)) kotlin/String|): R|kotlin/String| { ^ (String( (), R|/it|, String())) } ) } ?: String() diff --git a/analysis/low-level-api-fir/testData/lazyResolve/anonymousFunctionWithAnnotatedParameterOnImplicitTypePhaseScript.txt b/analysis/low-level-api-fir/testData/lazyResolve/anonymousFunctionWithAnnotatedParameterOnImplicitTypePhaseScript.txt index 79004392015..e584681c11f 100644 --- a/analysis/low-level-api-fir/testData/lazyResolve/anonymousFunctionWithAnnotatedParameterOnImplicitTypePhaseScript.txt +++ b/analysis/low-level-api-fir/testData/lazyResolve/anonymousFunctionWithAnnotatedParameterOnImplicitTypePhaseScript.txt @@ -231,7 +231,7 @@ FILE: [ResolvedTo(IMPORTS)] anonymousFunctionWithAnnotatedParameterOnImplicitTyp ^ Null(null) } - public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] val propertyToResolve: R|kotlin/String| + public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] [PostponedSymbolsForAnnotationResolutionKey=[FirPropertySymbol /nullablePropertyWithAnnotatedType]] val propertyToResolve: R|kotlin/String| public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] get(): R|kotlin/String| { ^ R|/nullablePropertyWithAnnotatedType|?.{ $subj$.R|kotlin/let|( = [ResolvedTo(RAW_FIR)] [MatchingParameterFunctionTypeKey=kotlin/Function1] let@fun ([ResolvedTo(BODY_RESOLVE)] it: R|@R|Anno|(String(str)) kotlin/String|): R|kotlin/String| { ^ (String( (), R|/it|, String())) @@ -246,24 +246,24 @@ FILE: [ResolvedTo(IMPORTS)] anonymousFunctionWithAnnotatedParameterOnImplicitTyp SCRIPT: [ResolvedTo(TYPES)] [ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array| - @R|kotlin/annotation/Target|[CompilerRequiredAnnotations](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public? final? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] annotation class Anno : R|kotlin/Annotation| { - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Anno.message] message: String): R|Anno| { + @R|kotlin/annotation/Target|[Types](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| { + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Anno.message] message: R|kotlin/String|): R|Anno| { LAZY_super } - public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val message: String = R|/message| - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): String + public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val message: R|kotlin/String| = R|/message| + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/String| } - public final [ResolvedTo(CONTRACTS)] val nullablePropertyWithAnnotatedType: R|@R|Anno|(String(str)) kotlin/String?| - public [ResolvedTo(CONTRACTS)] get(): R|@R|Anno|(String(str)) kotlin/String?| { + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] val nullablePropertyWithAnnotatedType: R|@R|Anno|(message = String(str)) kotlin/String?| + public [ResolvedTo(ANNOTATION_ARGUMENTS)] get(): R|@R|Anno|(message = String(str)) kotlin/String?| { ^ Null(null) } public final [ResolvedTo(ANNOTATION_ARGUMENTS)] val propertyToResolve: R|kotlin/String| public [ResolvedTo(ANNOTATION_ARGUMENTS)] get(): R|kotlin/String| { - ^ R|/nullablePropertyWithAnnotatedType|?.{ $subj$.R|kotlin/let|( = [ResolvedTo(RAW_FIR)] [MatchingParameterFunctionTypeKey=kotlin/Function1] let@fun ([ResolvedTo(BODY_RESOLVE)] it: R|@R|Anno|(String(str)) kotlin/String|): R|kotlin/String| { + ^ R|/nullablePropertyWithAnnotatedType|?.{ $subj$.R|kotlin/let|( = [ResolvedTo(RAW_FIR)] [MatchingParameterFunctionTypeKey=kotlin/Function1] let@fun ([ResolvedTo(BODY_RESOLVE)] it: R|@R|Anno|(message = String(str)) kotlin/String|): R|kotlin/String| { ^ (String( (), R|/it|, String())) } ) } ?: String() @@ -276,24 +276,24 @@ FILE: [ResolvedTo(IMPORTS)] anonymousFunctionWithAnnotatedParameterOnImplicitTyp SCRIPT: [ResolvedTo(TYPES)] [ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array| - @R|kotlin/annotation/Target|[CompilerRequiredAnnotations](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public? final? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] annotation class Anno : R|kotlin/Annotation| { - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Anno.message] message: String): R|Anno| { + @R|kotlin/annotation/Target|[Types](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| { + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Anno.message] message: R|kotlin/String|): R|Anno| { LAZY_super } - public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val message: String = R|/message| - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): String + public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val message: R|kotlin/String| = R|/message| + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/String| } - public final [ResolvedTo(CONTRACTS)] val nullablePropertyWithAnnotatedType: R|@R|Anno|(String(str)) kotlin/String?| - public [ResolvedTo(CONTRACTS)] get(): R|@R|Anno|(String(str)) kotlin/String?| { + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] val nullablePropertyWithAnnotatedType: R|@R|Anno|(message = String(str)) kotlin/String?| + public [ResolvedTo(ANNOTATION_ARGUMENTS)] get(): R|@R|Anno|(message = String(str)) kotlin/String?| { ^ Null(null) } public final [ResolvedTo(BODY_RESOLVE)] val propertyToResolve: R|kotlin/String| public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/String| { - ^ R|/nullablePropertyWithAnnotatedType|?.{ $subj$.R|kotlin/let|( = [ResolvedTo(BODY_RESOLVE)] [MatchingParameterFunctionTypeKey=kotlin/Function1] let@fun ([ResolvedTo(BODY_RESOLVE)] it: R|@R|Anno|(String(str)) kotlin/String|): R|kotlin/String| { + ^ R|/nullablePropertyWithAnnotatedType|?.{ $subj$.R|kotlin/let|( = [ResolvedTo(BODY_RESOLVE)] [MatchingParameterFunctionTypeKey=kotlin/Function1] let@fun ([ResolvedTo(BODY_RESOLVE)] it: R|@R|Anno|(message = String(str)) kotlin/String|): R|kotlin/String| { ^ (String( (), R|/it|, String())) } ) } ?: String() diff --git a/analysis/low-level-api-fir/testData/lazyResolve/anonymousFunctionWithAnnotatedParameterScript.txt b/analysis/low-level-api-fir/testData/lazyResolve/anonymousFunctionWithAnnotatedParameterScript.txt index 578b1f7ccdb..e3d63446d65 100644 --- a/analysis/low-level-api-fir/testData/lazyResolve/anonymousFunctionWithAnnotatedParameterScript.txt +++ b/analysis/low-level-api-fir/testData/lazyResolve/anonymousFunctionWithAnnotatedParameterScript.txt @@ -272,24 +272,24 @@ FILE: [ResolvedTo(IMPORTS)] anonymousFunctionWithAnnotatedParameterScript.kts SCRIPT: [ResolvedTo(TYPES)] [ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array| - @R|kotlin/annotation/Target|[CompilerRequiredAnnotations](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public? final? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] annotation class Anno : R|kotlin/Annotation| { - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Anno.message] message: String): R|Anno| { + @R|kotlin/annotation/Target|[Types](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| { + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Anno.message] message: R|kotlin/String|): R|Anno| { LAZY_super } - public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val message: String = R|/message| - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): String + public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val message: R|kotlin/String| = R|/message| + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/String| } - public final [ResolvedTo(CONTRACTS)] val nullablePropertyWithAnnotatedType: R|@R|Anno|(String(outer)) kotlin/collections/List<@R|Anno|(String(middle)) kotlin/collections/List<@R|Anno|(String(inner)) kotlin/Int>>?| - public [ResolvedTo(CONTRACTS)] get(): R|@R|Anno|(String(outer)) kotlin/collections/List<@R|Anno|(String(middle)) kotlin/collections/List<@R|Anno|(String(inner)) kotlin/Int>>?| { + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] val nullablePropertyWithAnnotatedType: R|@R|Anno|(message = String(outer)) kotlin/collections/List<@R|Anno|(message = String(middle)) kotlin/collections/List<@R|Anno|(message = String(inner)) kotlin/Int>>?| + public [ResolvedTo(ANNOTATION_ARGUMENTS)] get(): R|@R|Anno|(message = String(outer)) kotlin/collections/List<@R|Anno|(message = String(middle)) kotlin/collections/List<@R|Anno|(message = String(inner)) kotlin/Int>>?| { ^ Null(null) } public final [ResolvedTo(BODY_RESOLVE)] val propertyToResolve: R|kotlin/String| public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/String| { - ^ R|/nullablePropertyWithAnnotatedType|?.{ $subj$.R|kotlin/let|>|, R|kotlin/String|>( = [ResolvedTo(BODY_RESOLVE)] [MatchingParameterFunctionTypeKey=kotlin/Function1] let@fun ([ResolvedTo(BODY_RESOLVE)] it: R|@R|Anno|(String(outer)) kotlin/collections/List<@R|Anno|(String(middle)) kotlin/collections/List<@R|Anno|(String(inner)) kotlin/Int>>|): R|kotlin/String| { + ^ R|/nullablePropertyWithAnnotatedType|?.{ $subj$.R|kotlin/let|>|, R|kotlin/String|>( = [ResolvedTo(BODY_RESOLVE)] [MatchingParameterFunctionTypeKey=kotlin/Function1] let@fun ([ResolvedTo(BODY_RESOLVE)] it: R|@R|Anno|(message = String(outer)) kotlin/collections/List<@R|Anno|(message = String(middle)) kotlin/collections/List<@R|Anno|(message = String(inner)) kotlin/Int>>|): R|kotlin/String| { ^ (String( (), R|/it|, String())) } ) } ?: String() diff --git a/analysis/low-level-api-fir/testData/lazyResolve/implicitTypeWithInaccessibleAnnotation.txt b/analysis/low-level-api-fir/testData/lazyResolve/implicitTypeWithInaccessibleAnnotation.txt index 6cd6ba28bf8..342ac0feb3b 100644 --- a/analysis/low-level-api-fir/testData/lazyResolve/implicitTypeWithInaccessibleAnnotation.txt +++ b/analysis/low-level-api-fir/testData/lazyResolve/implicitTypeWithInaccessibleAnnotation.txt @@ -252,7 +252,7 @@ FILE: [ResolvedTo(IMPORTS)] implicitTypeWithInaccessibleAnnotation.kt public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): String } - public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] fun implicitType1(): R|@R|usage/Anno|(privateConstVal#) kotlin/Int| { + public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] [PostponedSymbolsForAnnotationResolutionKey=[FirNamedFunctionSymbol usage/TopLevelObject.expectedType]] fun implicitType1(): R|@R|usage/Anno|(privateConstVal#) kotlin/Int| { ^implicitType1 Q|usage/TopLevelObject|.R|usage/TopLevelObject.expectedType|() } public final [ResolvedTo(STATUS)] object TopLevelObject : R|kotlin/Any| { @@ -274,16 +274,16 @@ FILE: [ResolvedTo(IMPORTS)] implicitTypeWithInaccessibleAnnotation.kt ANNOTATION_ARGUMENTS: FILE: [ResolvedTo(IMPORTS)] implicitTypeWithInaccessibleAnnotation.kt - @R|kotlin/annotation/Target|[CompilerRequiredAnnotations](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public? final? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] annotation class Anno : R|kotlin/Annotation| { - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=usage/Anno.s] s: String): R|usage/Anno| { + @R|kotlin/annotation/Target|[Types](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| { + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=usage/Anno.s] s: R|kotlin/String|): R|usage/Anno| { LAZY_super } - public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val s: String = R|/s| - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): String + public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val s: R|kotlin/String| = R|/s| + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/String| } - public final [ResolvedTo(ANNOTATION_ARGUMENTS)] fun implicitType1(): R|@R|usage/Anno|(privateConstVal#) kotlin/Int| { + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] fun implicitType1(): R|@R|usage/Anno|(s = this@R|usage/TopLevelObject|.R|usage/TopLevelObject.privateConstVal|) kotlin/Int| { ^implicitType1 Q|usage/TopLevelObject|.R|usage/TopLevelObject.expectedType|() } public final [ResolvedTo(STATUS)] object TopLevelObject : R|kotlin/Any| { @@ -293,10 +293,10 @@ FILE: [ResolvedTo(IMPORTS)] implicitTypeWithInaccessibleAnnotation.kt public final [ResolvedTo(STATUS)] fun expectedType2(): R|@R|usage/Anno|(privateConstVal#) kotlin/Int| { LAZY_BLOCK } - private final const [ResolvedTo(STATUS)] val privateConstVal: = LAZY_EXPRESSION - private [ResolvedTo(STATUS)] [ContainingClassKey=TopLevelObject] get(): + private final const [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] val privateConstVal: R|kotlin/String| = String(privateConstVal) + private [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] [ContainingClassKey=TopLevelObject] get(): R|kotlin/String| - public final [ResolvedTo(CONTRACTS)] fun expectedType(): R|@R|usage/Anno|(privateConstVal#) kotlin/Int| { + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] fun expectedType(): R|@R|usage/Anno|(s = this@R|usage/TopLevelObject|.R|usage/TopLevelObject.privateConstVal|) kotlin/Int| { ^expectedType IntegerLiteral(4) } @@ -305,16 +305,16 @@ FILE: [ResolvedTo(IMPORTS)] implicitTypeWithInaccessibleAnnotation.kt BODY_RESOLVE: FILE: [ResolvedTo(IMPORTS)] implicitTypeWithInaccessibleAnnotation.kt - @R|kotlin/annotation/Target|[CompilerRequiredAnnotations](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public? final? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] annotation class Anno : R|kotlin/Annotation| { - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=usage/Anno.s] s: String): R|usage/Anno| { + @R|kotlin/annotation/Target|[Types](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| { + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=usage/Anno.s] s: R|kotlin/String|): R|usage/Anno| { LAZY_super } - public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val s: String = R|/s| - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): String + public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val s: R|kotlin/String| = R|/s| + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/String| } - public final [ResolvedTo(BODY_RESOLVE)] fun implicitType1(): R|@R|usage/Anno|(privateConstVal#) kotlin/Int| { + public final [ResolvedTo(BODY_RESOLVE)] fun implicitType1(): R|@R|usage/Anno|(s = this@R|usage/TopLevelObject|.R|usage/TopLevelObject.privateConstVal|) kotlin/Int| { ^implicitType1 Q|usage/TopLevelObject|.R|usage/TopLevelObject.expectedType|() } public final [ResolvedTo(STATUS)] object TopLevelObject : R|kotlin/Any| { @@ -324,10 +324,10 @@ FILE: [ResolvedTo(IMPORTS)] implicitTypeWithInaccessibleAnnotation.kt public final [ResolvedTo(STATUS)] fun expectedType2(): R|@R|usage/Anno|(privateConstVal#) kotlin/Int| { LAZY_BLOCK } - private final const [ResolvedTo(STATUS)] val privateConstVal: = LAZY_EXPRESSION - private [ResolvedTo(STATUS)] [ContainingClassKey=TopLevelObject] get(): + private final const [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] val privateConstVal: R|kotlin/String| = String(privateConstVal) + private [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] [ContainingClassKey=TopLevelObject] get(): R|kotlin/String| - public final [ResolvedTo(CONTRACTS)] fun expectedType(): R|@R|usage/Anno|(privateConstVal#) kotlin/Int| { + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] fun expectedType(): R|@R|usage/Anno|(s = this@R|usage/TopLevelObject|.R|usage/TopLevelObject.privateConstVal|) kotlin/Int| { ^expectedType IntegerLiteral(4) } diff --git a/analysis/low-level-api-fir/testData/lazyResolve/properties/impliciyTypeWithAnnotationOnFunction.txt b/analysis/low-level-api-fir/testData/lazyResolve/properties/impliciyTypeWithAnnotationOnFunction.txt index b670fff3a0e..ee0659a94ac 100644 --- a/analysis/low-level-api-fir/testData/lazyResolve/properties/impliciyTypeWithAnnotationOnFunction.txt +++ b/analysis/low-level-api-fir/testData/lazyResolve/properties/impliciyTypeWithAnnotationOnFunction.txt @@ -158,47 +158,47 @@ FILE: [ResolvedTo(IMPORTS)] impliciyTypeWithAnnotationOnFunction.kt public final [ResolvedTo(CONTRACTS)] fun typeWithAnnotation(): R|@R|Anno|(value#) kotlin/String| { ^typeWithAnnotation String() } - public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] fun resolveMe(): R|@R|Anno|(value#) kotlin/String| { + public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] [PostponedSymbolsForAnnotationResolutionKey=[FirNamedFunctionSymbol /typeWithAnnotation]] fun resolveMe(): R|@R|Anno|(value#) kotlin/String| { ^resolveMe R|/typeWithAnnotation|() } ANNOTATION_ARGUMENTS: FILE: [ResolvedTo(IMPORTS)] impliciyTypeWithAnnotationOnFunction.kt - @R|kotlin/annotation/Target|[CompilerRequiredAnnotations](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public? final? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] annotation class Anno : R|kotlin/Annotation| { - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Anno.number] number: Int): R|Anno| { + @R|kotlin/annotation/Target|[Types](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| { + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Anno.number] number: R|kotlin/Int|): R|Anno| { LAZY_super } - public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val number: Int = R|/number| - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): Int + public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val number: R|kotlin/Int| = R|/number| + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/Int| } - public? final? const [ResolvedTo(RAW_FIR)] val value: = LAZY_EXPRESSION - public? [ResolvedTo(RAW_FIR)] get(): - public final [ResolvedTo(CONTRACTS)] fun typeWithAnnotation(): R|@R|Anno|(value#) kotlin/String| { + public final const [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] val value: R|kotlin/Int| = Int(0) + public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] get(): R|kotlin/Int| + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] fun typeWithAnnotation(): R|@R|Anno|(number = R|/value|) kotlin/String| { ^typeWithAnnotation String() } - public final [ResolvedTo(ANNOTATION_ARGUMENTS)] fun resolveMe(): R|@R|Anno|(value#) kotlin/String| { + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] fun resolveMe(): R|@R|Anno|(number = R|/value|) kotlin/String| { ^resolveMe R|/typeWithAnnotation|() } BODY_RESOLVE: FILE: [ResolvedTo(IMPORTS)] impliciyTypeWithAnnotationOnFunction.kt - @R|kotlin/annotation/Target|[CompilerRequiredAnnotations](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public? final? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] annotation class Anno : R|kotlin/Annotation| { - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Anno.number] number: Int): R|Anno| { + @R|kotlin/annotation/Target|[Types](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| { + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Anno.number] number: R|kotlin/Int|): R|Anno| { LAZY_super } - public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val number: Int = R|/number| - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): Int + public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val number: R|kotlin/Int| = R|/number| + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/Int| } - public? final? const [ResolvedTo(RAW_FIR)] val value: = LAZY_EXPRESSION - public? [ResolvedTo(RAW_FIR)] get(): - public final [ResolvedTo(CONTRACTS)] fun typeWithAnnotation(): R|@R|Anno|(value#) kotlin/String| { + public final const [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] val value: R|kotlin/Int| = Int(0) + public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] get(): R|kotlin/Int| + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] fun typeWithAnnotation(): R|@R|Anno|(number = R|/value|) kotlin/String| { ^typeWithAnnotation String() } - public final [ResolvedTo(BODY_RESOLVE)] fun resolveMe(): R|@R|Anno|(value#) kotlin/String| { + public final [ResolvedTo(BODY_RESOLVE)] fun resolveMe(): R|@R|Anno|(number = R|/value|) kotlin/String| { ^resolveMe R|/typeWithAnnotation|() } diff --git a/analysis/low-level-api-fir/testData/lazyResolve/properties/impliciyTypeWithAnnotationOnProperty.txt b/analysis/low-level-api-fir/testData/lazyResolve/properties/impliciyTypeWithAnnotationOnProperty.txt index 3656a116990..97889060c5e 100644 --- a/analysis/low-level-api-fir/testData/lazyResolve/properties/impliciyTypeWithAnnotationOnProperty.txt +++ b/analysis/low-level-api-fir/testData/lazyResolve/properties/impliciyTypeWithAnnotationOnProperty.txt @@ -179,7 +179,7 @@ FILE: [ResolvedTo(IMPORTS)] impliciyTypeWithAnnotationOnProperty.kt public final [ResolvedTo(CONTRACTS)] fun typeWithAnnotation(): R|@R|Anno|(value#) kotlin/String| { ^typeWithAnnotation String() } - public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] var resolveMe: R|@R|Anno|(value#) kotlin/String| + public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] [PostponedSymbolsForAnnotationResolutionKey=[FirNamedFunctionSymbol /typeWithAnnotation]] var resolveMe: R|@R|Anno|(value#) kotlin/String| public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] get(): R|@R|Anno|(value#) kotlin/String| { ^ R|/typeWithAnnotation|() } @@ -188,48 +188,48 @@ FILE: [ResolvedTo(IMPORTS)] impliciyTypeWithAnnotationOnProperty.kt ANNOTATION_ARGUMENTS: FILE: [ResolvedTo(IMPORTS)] impliciyTypeWithAnnotationOnProperty.kt - @R|kotlin/annotation/Target|[CompilerRequiredAnnotations](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public? final? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] annotation class Anno : R|kotlin/Annotation| { - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Anno.number] number: Int): R|Anno| { + @R|kotlin/annotation/Target|[Types](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| { + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Anno.number] number: R|kotlin/Int|): R|Anno| { LAZY_super } - public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val number: Int = R|/number| - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): Int + public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val number: R|kotlin/Int| = R|/number| + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/Int| } - public? final? const [ResolvedTo(RAW_FIR)] val value: = LAZY_EXPRESSION - public? [ResolvedTo(RAW_FIR)] get(): - public final [ResolvedTo(CONTRACTS)] fun typeWithAnnotation(): R|@R|Anno|(value#) kotlin/String| { + public final const [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] val value: R|kotlin/Int| = Int(0) + public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] get(): R|kotlin/Int| + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] fun typeWithAnnotation(): R|@R|Anno|(number = R|/value|) kotlin/String| { ^typeWithAnnotation String() } - public final [ResolvedTo(ANNOTATION_ARGUMENTS)] var resolveMe: R|@R|Anno|(value#) kotlin/String| - public [ResolvedTo(ANNOTATION_ARGUMENTS)] get(): R|@R|Anno|(value#) kotlin/String| { + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] var resolveMe: R|@R|Anno|(number = R|/value|) kotlin/String| + public [ResolvedTo(ANNOTATION_ARGUMENTS)] get(): R|@R|Anno|(number = R|/value|) kotlin/String| { ^ R|/typeWithAnnotation|() } - public [ResolvedTo(ANNOTATION_ARGUMENTS)] set([ResolvedTo(ANNOTATION_ARGUMENTS)] value: R|@R|Anno|(value#) kotlin/String|): R|kotlin/Unit| { + public [ResolvedTo(ANNOTATION_ARGUMENTS)] set([ResolvedTo(ANNOTATION_ARGUMENTS)] value: R|@R|Anno|(number = R|/value|) kotlin/String|): R|kotlin/Unit| { } BODY_RESOLVE: FILE: [ResolvedTo(IMPORTS)] impliciyTypeWithAnnotationOnProperty.kt - @R|kotlin/annotation/Target|[CompilerRequiredAnnotations](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public? final? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] annotation class Anno : R|kotlin/Annotation| { - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Anno.number] number: Int): R|Anno| { + @R|kotlin/annotation/Target|[Types](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| { + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Anno.number] number: R|kotlin/Int|): R|Anno| { LAZY_super } - public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val number: Int = R|/number| - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): Int + public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val number: R|kotlin/Int| = R|/number| + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/Int| } - public? final? const [ResolvedTo(RAW_FIR)] val value: = LAZY_EXPRESSION - public? [ResolvedTo(RAW_FIR)] get(): - public final [ResolvedTo(CONTRACTS)] fun typeWithAnnotation(): R|@R|Anno|(value#) kotlin/String| { + public final const [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] val value: R|kotlin/Int| = Int(0) + public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] get(): R|kotlin/Int| + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] fun typeWithAnnotation(): R|@R|Anno|(number = R|/value|) kotlin/String| { ^typeWithAnnotation String() } - public final [ResolvedTo(BODY_RESOLVE)] var resolveMe: R|@R|Anno|(value#) kotlin/String| - public [ResolvedTo(BODY_RESOLVE)] get(): R|@R|Anno|(value#) kotlin/String| { + public final [ResolvedTo(BODY_RESOLVE)] var resolveMe: R|@R|Anno|(number = R|/value|) kotlin/String| + public [ResolvedTo(BODY_RESOLVE)] get(): R|@R|Anno|(number = R|/value|) kotlin/String| { ^ R|/typeWithAnnotation|() } - public [ResolvedTo(BODY_RESOLVE)] set([ResolvedTo(BODY_RESOLVE)] value: R|@R|Anno|(value#) kotlin/String|): R|kotlin/Unit| { + public [ResolvedTo(BODY_RESOLVE)] set([ResolvedTo(BODY_RESOLVE)] value: R|@R|Anno|(number = R|/value|) kotlin/String|): R|kotlin/Unit| { } FILE RAW TO BODY: diff --git a/analysis/low-level-api-fir/testData/lazyResolve/properties/resultWithPropagatedType.txt b/analysis/low-level-api-fir/testData/lazyResolve/properties/resultWithPropagatedType.txt index cc373b7ecf4..a1da77ed2a5 100644 --- a/analysis/low-level-api-fir/testData/lazyResolve/properties/resultWithPropagatedType.txt +++ b/analysis/low-level-api-fir/testData/lazyResolve/properties/resultWithPropagatedType.txt @@ -246,7 +246,7 @@ FILE: [ResolvedTo(IMPORTS)] resultWithPropagatedType.kts ^explicitType IntegerLiteral(0) } - public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] val $$result: R|@R|foo/Anno|((String(return type: ), constant#)) kotlin/collections/List<@R|foo/Anno|((String(nested return type: ), constant#)) kotlin/collections/Collection<@R|foo/Anno|((String(nested nested return type: ), constant#)) kotlin/String>>| = R|foo/explicitType|() + public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] [PostponedSymbolsForAnnotationResolutionKey=[FirNamedFunctionSymbol foo/explicitType]] val $$result: R|@R|foo/Anno|((String(return type: ), constant#)) kotlin/collections/List<@R|foo/Anno|((String(nested return type: ), constant#)) kotlin/collections/Collection<@R|foo/Anno|((String(nested nested return type: ), constant#)) kotlin/String>>| = R|foo/explicitType|() public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] get(): R|@R|foo/Anno|((String(return type: ), constant#)) kotlin/collections/List<@R|foo/Anno|((String(nested return type: ), constant#)) kotlin/collections/Collection<@R|foo/Anno|((String(nested nested return type: ), constant#)) kotlin/String>>| @@ -256,25 +256,25 @@ FILE: [ResolvedTo(IMPORTS)] resultWithPropagatedType.kts SCRIPT: [ResolvedTo(ANNOTATION_ARGUMENTS)] [ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array| - @R|kotlin/annotation/Target|[CompilerRequiredAnnotations](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public? final? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] annotation class Anno : R|kotlin/Annotation| { - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=foo/Anno.position] position: String): R|foo/Anno| { + @R|kotlin/annotation/Target|[Types](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| { + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=foo/Anno.position] position: R|kotlin/String|): R|foo/Anno| { LAZY_super } - public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val position: String = R|/position| - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): String + public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val position: R|kotlin/String| = R|/position| + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/String| } - public? final? const [ResolvedTo(RAW_FIR)] val constant: = LAZY_EXPRESSION - public? [ResolvedTo(RAW_FIR)] get(): + public final const [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] val constant: R|kotlin/Int| = Int(0) + public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] get(): R|kotlin/Int| - public final [ResolvedTo(CONTRACTS)] fun explicitType(): R|@R|foo/Anno|((String(return type: ), constant#)) kotlin/collections/List<@R|foo/Anno|((String(nested return type: ), constant#)) kotlin/collections/Collection<@R|foo/Anno|((String(nested nested return type: ), constant#)) kotlin/String>>| { + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] fun explicitType(): R|@R|foo/Anno|(position = (String(return type: ), R|foo/constant|)) kotlin/collections/List<@R|foo/Anno|(position = (String(nested return type: ), R|foo/constant|)) kotlin/collections/Collection<@R|foo/Anno|(position = (String(nested nested return type: ), R|foo/constant|)) kotlin/String>>| { ^explicitType IntegerLiteral(0) } - public final [ResolvedTo(ANNOTATION_ARGUMENTS)] val $$result: R|@R|foo/Anno|((String(return type: ), constant#)) kotlin/collections/List<@R|foo/Anno|((String(nested return type: ), constant#)) kotlin/collections/Collection<@R|foo/Anno|((String(nested nested return type: ), constant#)) kotlin/String>>| = R|foo/explicitType|() - public [ResolvedTo(ANNOTATION_ARGUMENTS)] get(): R|@R|foo/Anno|((String(return type: ), constant#)) kotlin/collections/List<@R|foo/Anno|((String(nested return type: ), constant#)) kotlin/collections/Collection<@R|foo/Anno|((String(nested nested return type: ), constant#)) kotlin/String>>| + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] val $$result: R|@R|foo/Anno|(position = (String(return type: ), R|foo/constant|)) kotlin/collections/List<@R|foo/Anno|(position = (String(nested return type: ), R|foo/constant|)) kotlin/collections/Collection<@R|foo/Anno|(position = (String(nested nested return type: ), R|foo/constant|)) kotlin/String>>| = R|foo/explicitType|() + public [ResolvedTo(ANNOTATION_ARGUMENTS)] get(): R|@R|foo/Anno|(position = (String(return type: ), R|foo/constant|)) kotlin/collections/List<@R|foo/Anno|(position = (String(nested return type: ), R|foo/constant|)) kotlin/collections/Collection<@R|foo/Anno|(position = (String(nested nested return type: ), R|foo/constant|)) kotlin/String>>| BODY_RESOLVE: @@ -283,25 +283,25 @@ FILE: [ResolvedTo(IMPORTS)] resultWithPropagatedType.kts SCRIPT: [ResolvedTo(BODY_RESOLVE)] [ResolvedTo(BODY_RESOLVE)] lval args: R|kotlin/Array| - @R|kotlin/annotation/Target|[CompilerRequiredAnnotations](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public? final? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] annotation class Anno : R|kotlin/Annotation| { - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=foo/Anno.position] position: String): R|foo/Anno| { + @R|kotlin/annotation/Target|[Types](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| { + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=foo/Anno.position] position: R|kotlin/String|): R|foo/Anno| { LAZY_super } - public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val position: String = R|/position| - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): String + public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val position: R|kotlin/String| = R|/position| + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/String| } - public? final? const [ResolvedTo(RAW_FIR)] val constant: = LAZY_EXPRESSION - public? [ResolvedTo(RAW_FIR)] get(): + public final const [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] val constant: R|kotlin/Int| = Int(0) + public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] get(): R|kotlin/Int| - public final [ResolvedTo(CONTRACTS)] fun explicitType(): R|@R|foo/Anno|((String(return type: ), constant#)) kotlin/collections/List<@R|foo/Anno|((String(nested return type: ), constant#)) kotlin/collections/Collection<@R|foo/Anno|((String(nested nested return type: ), constant#)) kotlin/String>>| { + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] fun explicitType(): R|@R|foo/Anno|(position = (String(return type: ), R|foo/constant|)) kotlin/collections/List<@R|foo/Anno|(position = (String(nested return type: ), R|foo/constant|)) kotlin/collections/Collection<@R|foo/Anno|(position = (String(nested nested return type: ), R|foo/constant|)) kotlin/String>>| { ^explicitType IntegerLiteral(0) } - public final [ResolvedTo(BODY_RESOLVE)] val $$result: R|@R|foo/Anno|((String(return type: ), constant#)) kotlin/collections/List<@R|foo/Anno|((String(nested return type: ), constant#)) kotlin/collections/Collection<@R|foo/Anno|((String(nested nested return type: ), constant#)) kotlin/String>>| = R|foo/explicitType|() - public [ResolvedTo(BODY_RESOLVE)] get(): R|@R|foo/Anno|((String(return type: ), constant#)) kotlin/collections/List<@R|foo/Anno|((String(nested return type: ), constant#)) kotlin/collections/Collection<@R|foo/Anno|((String(nested nested return type: ), constant#)) kotlin/String>>| + public final [ResolvedTo(BODY_RESOLVE)] val $$result: R|@R|foo/Anno|(position = (String(return type: ), R|foo/constant|)) kotlin/collections/List<@R|foo/Anno|(position = (String(nested return type: ), R|foo/constant|)) kotlin/collections/Collection<@R|foo/Anno|(position = (String(nested nested return type: ), R|foo/constant|)) kotlin/String>>| = R|foo/explicitType|() + public [ResolvedTo(BODY_RESOLVE)] get(): R|@R|foo/Anno|(position = (String(return type: ), R|foo/constant|)) kotlin/collections/List<@R|foo/Anno|(position = (String(nested return type: ), R|foo/constant|)) kotlin/collections/Collection<@R|foo/Anno|(position = (String(nested nested return type: ), R|foo/constant|)) kotlin/String>>| FILE RAW TO BODY: diff --git a/analysis/low-level-api-fir/testData/lazyResolve/properties/scriptWithResultWithPropagatedType.txt b/analysis/low-level-api-fir/testData/lazyResolve/properties/scriptWithResultWithPropagatedType.txt index 7b63ab52557..879bbcaa490 100644 --- a/analysis/low-level-api-fir/testData/lazyResolve/properties/scriptWithResultWithPropagatedType.txt +++ b/analysis/low-level-api-fir/testData/lazyResolve/properties/scriptWithResultWithPropagatedType.txt @@ -246,7 +246,7 @@ FILE: [ResolvedTo(IMPORTS)] scriptWithResultWithPropagatedType.kts ^explicitType IntegerLiteral(0) } - public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] val $$result: R|@R|foo/Anno|((String(return type: ), constant#)) kotlin/collections/List<@R|foo/Anno|((String(nested return type: ), constant#)) kotlin/collections/Collection<@R|foo/Anno|((String(nested nested return type: ), constant#)) kotlin/String>>| = R|foo/explicitType|() + public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] [PostponedSymbolsForAnnotationResolutionKey=[FirNamedFunctionSymbol foo/explicitType]] val $$result: R|@R|foo/Anno|((String(return type: ), constant#)) kotlin/collections/List<@R|foo/Anno|((String(nested return type: ), constant#)) kotlin/collections/Collection<@R|foo/Anno|((String(nested nested return type: ), constant#)) kotlin/String>>| = R|foo/explicitType|() public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] get(): R|@R|foo/Anno|((String(return type: ), constant#)) kotlin/collections/List<@R|foo/Anno|((String(nested return type: ), constant#)) kotlin/collections/Collection<@R|foo/Anno|((String(nested nested return type: ), constant#)) kotlin/String>>| @@ -256,25 +256,25 @@ FILE: [ResolvedTo(IMPORTS)] scriptWithResultWithPropagatedType.kts SCRIPT: [ResolvedTo(ANNOTATION_ARGUMENTS)] [ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array| - @R|kotlin/annotation/Target|[CompilerRequiredAnnotations](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public? final? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] annotation class Anno : R|kotlin/Annotation| { - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=foo/Anno.position] position: String): R|foo/Anno| { + @R|kotlin/annotation/Target|[Types](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| { + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=foo/Anno.position] position: R|kotlin/String|): R|foo/Anno| { LAZY_super } - public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val position: String = R|/position| - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): String + public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val position: R|kotlin/String| = R|/position| + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/String| } - public? final? const [ResolvedTo(RAW_FIR)] val constant: = LAZY_EXPRESSION - public? [ResolvedTo(RAW_FIR)] get(): + public final const [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] val constant: R|kotlin/Int| = Int(0) + public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] get(): R|kotlin/Int| - public final [ResolvedTo(CONTRACTS)] fun explicitType(): R|@R|foo/Anno|((String(return type: ), constant#)) kotlin/collections/List<@R|foo/Anno|((String(nested return type: ), constant#)) kotlin/collections/Collection<@R|foo/Anno|((String(nested nested return type: ), constant#)) kotlin/String>>| { + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] fun explicitType(): R|@R|foo/Anno|(position = (String(return type: ), R|foo/constant|)) kotlin/collections/List<@R|foo/Anno|(position = (String(nested return type: ), R|foo/constant|)) kotlin/collections/Collection<@R|foo/Anno|(position = (String(nested nested return type: ), R|foo/constant|)) kotlin/String>>| { ^explicitType IntegerLiteral(0) } - public final [ResolvedTo(ANNOTATION_ARGUMENTS)] val $$result: R|@R|foo/Anno|((String(return type: ), constant#)) kotlin/collections/List<@R|foo/Anno|((String(nested return type: ), constant#)) kotlin/collections/Collection<@R|foo/Anno|((String(nested nested return type: ), constant#)) kotlin/String>>| = R|foo/explicitType|() - public [ResolvedTo(ANNOTATION_ARGUMENTS)] get(): R|@R|foo/Anno|((String(return type: ), constant#)) kotlin/collections/List<@R|foo/Anno|((String(nested return type: ), constant#)) kotlin/collections/Collection<@R|foo/Anno|((String(nested nested return type: ), constant#)) kotlin/String>>| + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] val $$result: R|@R|foo/Anno|(position = (String(return type: ), R|foo/constant|)) kotlin/collections/List<@R|foo/Anno|(position = (String(nested return type: ), R|foo/constant|)) kotlin/collections/Collection<@R|foo/Anno|(position = (String(nested nested return type: ), R|foo/constant|)) kotlin/String>>| = R|foo/explicitType|() + public [ResolvedTo(ANNOTATION_ARGUMENTS)] get(): R|@R|foo/Anno|(position = (String(return type: ), R|foo/constant|)) kotlin/collections/List<@R|foo/Anno|(position = (String(nested return type: ), R|foo/constant|)) kotlin/collections/Collection<@R|foo/Anno|(position = (String(nested nested return type: ), R|foo/constant|)) kotlin/String>>| BODY_RESOLVE: @@ -283,25 +283,25 @@ FILE: [ResolvedTo(IMPORTS)] scriptWithResultWithPropagatedType.kts SCRIPT: [ResolvedTo(BODY_RESOLVE)] [ResolvedTo(BODY_RESOLVE)] lval args: R|kotlin/Array| - @R|kotlin/annotation/Target|[CompilerRequiredAnnotations](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public? final? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] annotation class Anno : R|kotlin/Annotation| { - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=foo/Anno.position] position: String): R|foo/Anno| { + @R|kotlin/annotation/Target|[Types](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| { + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=foo/Anno.position] position: R|kotlin/String|): R|foo/Anno| { LAZY_super } - public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val position: String = R|/position| - public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Anno] get(): String + public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val position: R|kotlin/String| = R|/position| + public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/String| } - public? final? const [ResolvedTo(RAW_FIR)] val constant: = LAZY_EXPRESSION - public? [ResolvedTo(RAW_FIR)] get(): + public final const [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] val constant: R|kotlin/Int| = Int(0) + public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] get(): R|kotlin/Int| - public final [ResolvedTo(CONTRACTS)] fun explicitType(): R|@R|foo/Anno|((String(return type: ), constant#)) kotlin/collections/List<@R|foo/Anno|((String(nested return type: ), constant#)) kotlin/collections/Collection<@R|foo/Anno|((String(nested nested return type: ), constant#)) kotlin/String>>| { + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] fun explicitType(): R|@R|foo/Anno|(position = (String(return type: ), R|foo/constant|)) kotlin/collections/List<@R|foo/Anno|(position = (String(nested return type: ), R|foo/constant|)) kotlin/collections/Collection<@R|foo/Anno|(position = (String(nested nested return type: ), R|foo/constant|)) kotlin/String>>| { ^explicitType IntegerLiteral(0) } - public final [ResolvedTo(BODY_RESOLVE)] val $$result: R|@R|foo/Anno|((String(return type: ), constant#)) kotlin/collections/List<@R|foo/Anno|((String(nested return type: ), constant#)) kotlin/collections/Collection<@R|foo/Anno|((String(nested nested return type: ), constant#)) kotlin/String>>| = R|foo/explicitType|() - public [ResolvedTo(BODY_RESOLVE)] get(): R|@R|foo/Anno|((String(return type: ), constant#)) kotlin/collections/List<@R|foo/Anno|((String(nested return type: ), constant#)) kotlin/collections/Collection<@R|foo/Anno|((String(nested nested return type: ), constant#)) kotlin/String>>| + public final [ResolvedTo(BODY_RESOLVE)] val $$result: R|@R|foo/Anno|(position = (String(return type: ), R|foo/constant|)) kotlin/collections/List<@R|foo/Anno|(position = (String(nested return type: ), R|foo/constant|)) kotlin/collections/Collection<@R|foo/Anno|(position = (String(nested nested return type: ), R|foo/constant|)) kotlin/String>>| = R|foo/explicitType|() + public [ResolvedTo(BODY_RESOLVE)] get(): R|@R|foo/Anno|(position = (String(return type: ), R|foo/constant|)) kotlin/collections/List<@R|foo/Anno|(position = (String(nested return type: ), R|foo/constant|)) kotlin/collections/Collection<@R|foo/Anno|(position = (String(nested nested return type: ), R|foo/constant|)) kotlin/String>>| FILE RAW TO BODY: diff --git a/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/constructor/propagationToLocalMemberFunction.before.txt b/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/constructor/propagationToLocalMemberFunction.before.txt index 86b50e86d75..a878697ef0b 100644 --- a/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/constructor/propagationToLocalMemberFunction.before.txt +++ b/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/constructor/propagationToLocalMemberFunction.before.txt @@ -1,36 +1,36 @@ -@R|util/Anno|((String(bar ), prop#)) kotlin/collections/List<@R|util/Anno|((String(nested bar ), prop#)) kotlin/collections/Collection<@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int>>? +@R|util/Anno|(str = (String(bar ), R|util/prop|)) kotlin/collections/List<@R|util/Anno|(str = (String(nested bar ), R|util/prop|)) kotlin/collections/Collection<@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int>>? context -> FirNamedFunctionSymbol /doo anchor -> [FirNamedFunctionSymbol util/bar] -@R|util/Anno|((String(nested bar ), prop#)) kotlin/collections/Collection<@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int> +@R|util/Anno|(str = (String(nested bar ), R|util/prop|)) kotlin/collections/Collection<@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int> context -> FirNamedFunctionSymbol /doo anchor -> [FirNamedFunctionSymbol util/bar] -@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int +@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int context -> FirNamedFunctionSymbol /doo anchor -> [FirNamedFunctionSymbol util/bar] -@R|util/Anno|((String(bar ), prop#)) kotlin/collections/List<@R|util/Anno|((String(nested bar ), prop#)) kotlin/collections/Collection<@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int>>? +@R|util/Anno|(str = (String(bar ), R|util/prop|)) kotlin/collections/List<@R|util/Anno|(str = (String(nested bar ), R|util/prop|)) kotlin/collections/Collection<@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int>>? context -> FirNamedFunctionSymbol /foo anchor -> [FirNamedFunctionSymbol util/bar] -@R|util/Anno|((String(nested bar ), prop#)) kotlin/collections/Collection<@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int> +@R|util/Anno|(str = (String(nested bar ), R|util/prop|)) kotlin/collections/Collection<@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int> context -> FirNamedFunctionSymbol /foo anchor -> [FirNamedFunctionSymbol util/bar] -@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int +@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int context -> FirNamedFunctionSymbol /foo anchor -> [FirNamedFunctionSymbol util/bar] -@R|util/Anno|((String(bar ), prop#)) kotlin/collections/List<@R|util/Anno|((String(nested bar ), prop#)) kotlin/collections/Collection<@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int>>? +@R|util/Anno|(str = (String(bar ), R|util/prop|)) kotlin/collections/List<@R|util/Anno|(str = (String(nested bar ), R|util/prop|)) kotlin/collections/Collection<@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int>>? context -> FirNamedFunctionSymbol /baz anchor -> [FirNamedFunctionSymbol util/bar] -@R|util/Anno|((String(nested bar ), prop#)) kotlin/collections/Collection<@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int> +@R|util/Anno|(str = (String(nested bar ), R|util/prop|)) kotlin/collections/Collection<@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int> context -> FirNamedFunctionSymbol /baz anchor -> [FirNamedFunctionSymbol util/bar] -@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int +@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int context -> FirNamedFunctionSymbol /baz anchor -> [FirNamedFunctionSymbol util/bar] @@ -82,7 +82,7 @@ FILE: [ResolvedTo(IMPORTS)] propagationToLocalMemberFunction.kt } public final const [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] val prop: R|kotlin/String| = String(str) public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] get(): R|kotlin/String| - public final [ResolvedTo(CONTRACTS)] fun bar(): R|@R|util/Anno|((String(bar ), prop#)) kotlin/collections/List<@R|util/Anno|((String(nested bar ), prop#)) kotlin/collections/Collection<@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int>>?| { + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] fun bar(): R|@R|util/Anno|(str = (String(bar ), R|util/prop|)) kotlin/collections/List<@R|util/Anno|(str = (String(nested bar ), R|util/prop|)) kotlin/collections/Collection<@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int>>?| { ^bar Null(null) } public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class A : R|kotlin/Any| { @@ -93,15 +93,15 @@ FILE: [ResolvedTo(IMPORTS)] propagationToLocalMemberFunction.kt super() } - public final [ResolvedTo(BODY_RESOLVE)] fun doo(): R|@R|util/Anno|((String(bar ), prop#)) kotlin/collections/List<@R|util/Anno|((String(nested bar ), prop#)) kotlin/collections/Collection<@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int>>?| { + public final [ResolvedTo(BODY_RESOLVE)] fun doo(): R|@R|util/Anno|(str = (String(bar ), R|util/prop|)) kotlin/collections/List<@R|util/Anno|(str = (String(nested bar ), R|util/prop|)) kotlin/collections/Collection<@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int>>?| { ^doo this@R|/OuterIntoLocal|.R|/foo|() } - public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|@R|util/Anno|((String(bar ), prop#)) kotlin/collections/List<@R|util/Anno|((String(nested bar ), prop#)) kotlin/collections/Collection<@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int>>?| { + public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|@R|util/Anno|(str = (String(bar ), R|util/prop|)) kotlin/collections/List<@R|util/Anno|(str = (String(nested bar ), R|util/prop|)) kotlin/collections/Collection<@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int>>?| { ^foo R|util/bar|() } - public final [ResolvedTo(BODY_RESOLVE)] fun baz(): R|@R|util/Anno|((String(bar ), prop#)) kotlin/collections/List<@R|util/Anno|((String(nested bar ), prop#)) kotlin/collections/Collection<@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int>>?| { + public final [ResolvedTo(BODY_RESOLVE)] fun baz(): R|@R|util/Anno|(str = (String(bar ), R|util/prop|)) kotlin/collections/List<@R|util/Anno|(str = (String(nested bar ), R|util/prop|)) kotlin/collections/Collection<@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int>>?| { ^baz this@R|/OuterIntoLocal|.R|/foo|() } diff --git a/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/constructor/propagationToLocalMemberFunction.lazyResolve.txt b/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/constructor/propagationToLocalMemberFunction.lazyResolve.txt index 826119fa48f..e9945611f15 100644 --- a/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/constructor/propagationToLocalMemberFunction.lazyResolve.txt +++ b/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/constructor/propagationToLocalMemberFunction.lazyResolve.txt @@ -340,7 +340,7 @@ FILE: [ResolvedTo(IMPORTS)] propagationToLocalMemberFunction.kt } public final const [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] val prop: R|kotlin/String| = String(str) public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] get(): R|kotlin/String| - public final [ResolvedTo(CONTRACTS)] fun bar(): R|@R|util/Anno|((String(bar ), prop#)) kotlin/collections/List<@R|util/Anno|((String(nested bar ), prop#)) kotlin/collections/Collection<@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int>>?| { + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] fun bar(): R|@R|util/Anno|(str = (String(bar ), R|util/prop|)) kotlin/collections/List<@R|util/Anno|(str = (String(nested bar ), R|util/prop|)) kotlin/collections/Collection<@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int>>?| { ^bar Null(null) } public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class A : R|kotlin/Any| { @@ -351,15 +351,15 @@ FILE: [ResolvedTo(IMPORTS)] propagationToLocalMemberFunction.kt super() } - public final [ResolvedTo(BODY_RESOLVE)] fun doo(): R|@R|util/Anno|((String(bar ), prop#)) kotlin/collections/List<@R|util/Anno|((String(nested bar ), prop#)) kotlin/collections/Collection<@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int>>?| { + public final [ResolvedTo(BODY_RESOLVE)] fun doo(): R|@R|util/Anno|(str = (String(bar ), R|util/prop|)) kotlin/collections/List<@R|util/Anno|(str = (String(nested bar ), R|util/prop|)) kotlin/collections/Collection<@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int>>?| { ^doo this@R|/OuterIntoLocal|.R|/foo|() } - public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|@R|util/Anno|((String(bar ), prop#)) kotlin/collections/List<@R|util/Anno|((String(nested bar ), prop#)) kotlin/collections/Collection<@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int>>?| { + public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|@R|util/Anno|(str = (String(bar ), R|util/prop|)) kotlin/collections/List<@R|util/Anno|(str = (String(nested bar ), R|util/prop|)) kotlin/collections/Collection<@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int>>?| { ^foo R|util/bar|() } - public final [ResolvedTo(BODY_RESOLVE)] fun baz(): R|@R|util/Anno|((String(bar ), prop#)) kotlin/collections/List<@R|util/Anno|((String(nested bar ), prop#)) kotlin/collections/Collection<@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int>>?| { + public final [ResolvedTo(BODY_RESOLVE)] fun baz(): R|@R|util/Anno|(str = (String(bar ), R|util/prop|)) kotlin/collections/List<@R|util/Anno|(str = (String(nested bar ), R|util/prop|)) kotlin/collections/Collection<@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int>>?| { ^baz this@R|/OuterIntoLocal|.R|/foo|() } diff --git a/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/constructor/propagationToLocalMemberFunctionScript.before.txt b/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/constructor/propagationToLocalMemberFunctionScript.before.txt index b0079c4ca86..3cb3721758d 100644 --- a/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/constructor/propagationToLocalMemberFunctionScript.before.txt +++ b/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/constructor/propagationToLocalMemberFunctionScript.before.txt @@ -1,36 +1,36 @@ -@R|util/Anno|((String(bar ), prop#)) kotlin/collections/List<@R|util/Anno|((String(nested bar ), prop#)) kotlin/collections/Collection<@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int>>? +@R|util/Anno|(str = (String(bar ), R|util/prop|)) kotlin/collections/List<@R|util/Anno|(str = (String(nested bar ), R|util/prop|)) kotlin/collections/Collection<@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int>>? context -> FirNamedFunctionSymbol /doo anchor -> [FirNamedFunctionSymbol util/bar] -@R|util/Anno|((String(nested bar ), prop#)) kotlin/collections/Collection<@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int> +@R|util/Anno|(str = (String(nested bar ), R|util/prop|)) kotlin/collections/Collection<@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int> context -> FirNamedFunctionSymbol /doo anchor -> [FirNamedFunctionSymbol util/bar] -@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int +@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int context -> FirNamedFunctionSymbol /doo anchor -> [FirNamedFunctionSymbol util/bar] -@R|util/Anno|((String(bar ), prop#)) kotlin/collections/List<@R|util/Anno|((String(nested bar ), prop#)) kotlin/collections/Collection<@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int>>? +@R|util/Anno|(str = (String(bar ), R|util/prop|)) kotlin/collections/List<@R|util/Anno|(str = (String(nested bar ), R|util/prop|)) kotlin/collections/Collection<@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int>>? context -> FirNamedFunctionSymbol /foo anchor -> [FirNamedFunctionSymbol util/bar] -@R|util/Anno|((String(nested bar ), prop#)) kotlin/collections/Collection<@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int> +@R|util/Anno|(str = (String(nested bar ), R|util/prop|)) kotlin/collections/Collection<@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int> context -> FirNamedFunctionSymbol /foo anchor -> [FirNamedFunctionSymbol util/bar] -@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int +@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int context -> FirNamedFunctionSymbol /foo anchor -> [FirNamedFunctionSymbol util/bar] -@R|util/Anno|((String(bar ), prop#)) kotlin/collections/List<@R|util/Anno|((String(nested bar ), prop#)) kotlin/collections/Collection<@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int>>? +@R|util/Anno|(str = (String(bar ), R|util/prop|)) kotlin/collections/List<@R|util/Anno|(str = (String(nested bar ), R|util/prop|)) kotlin/collections/Collection<@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int>>? context -> FirNamedFunctionSymbol /baz anchor -> [FirNamedFunctionSymbol util/bar] -@R|util/Anno|((String(nested bar ), prop#)) kotlin/collections/Collection<@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int> +@R|util/Anno|(str = (String(nested bar ), R|util/prop|)) kotlin/collections/Collection<@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int> context -> FirNamedFunctionSymbol /baz anchor -> [FirNamedFunctionSymbol util/bar] -@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int +@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int context -> FirNamedFunctionSymbol /baz anchor -> [FirNamedFunctionSymbol util/bar] @@ -88,7 +88,7 @@ FILE: [ResolvedTo(IMPORTS)] propagationToLocalMemberFunctionScript.kts public final const [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] val prop: R|kotlin/String| = String(str) public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] get(): R|kotlin/String| - public final [ResolvedTo(CONTRACTS)] fun bar(): R|@R|util/Anno|((String(bar ), prop#)) kotlin/collections/List<@R|util/Anno|((String(nested bar ), prop#)) kotlin/collections/Collection<@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int>>?| { + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] fun bar(): R|@R|util/Anno|(str = (String(bar ), R|util/prop|)) kotlin/collections/List<@R|util/Anno|(str = (String(nested bar ), R|util/prop|)) kotlin/collections/Collection<@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int>>?| { ^bar Null(null) } @@ -100,15 +100,15 @@ FILE: [ResolvedTo(IMPORTS)] propagationToLocalMemberFunctionScript.kts super() } - public final [ResolvedTo(BODY_RESOLVE)] fun doo(): R|@R|util/Anno|((String(bar ), prop#)) kotlin/collections/List<@R|util/Anno|((String(nested bar ), prop#)) kotlin/collections/Collection<@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int>>?| { + public final [ResolvedTo(BODY_RESOLVE)] fun doo(): R|@R|util/Anno|(str = (String(bar ), R|util/prop|)) kotlin/collections/List<@R|util/Anno|(str = (String(nested bar ), R|util/prop|)) kotlin/collections/Collection<@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int>>?| { ^doo this@R|/OuterIntoLocal|.R|/foo|() } - public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|@R|util/Anno|((String(bar ), prop#)) kotlin/collections/List<@R|util/Anno|((String(nested bar ), prop#)) kotlin/collections/Collection<@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int>>?| { + public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|@R|util/Anno|(str = (String(bar ), R|util/prop|)) kotlin/collections/List<@R|util/Anno|(str = (String(nested bar ), R|util/prop|)) kotlin/collections/Collection<@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int>>?| { ^foo R|util/bar|() } - public final [ResolvedTo(BODY_RESOLVE)] fun baz(): R|@R|util/Anno|((String(bar ), prop#)) kotlin/collections/List<@R|util/Anno|((String(nested bar ), prop#)) kotlin/collections/Collection<@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int>>?| { + public final [ResolvedTo(BODY_RESOLVE)] fun baz(): R|@R|util/Anno|(str = (String(bar ), R|util/prop|)) kotlin/collections/List<@R|util/Anno|(str = (String(nested bar ), R|util/prop|)) kotlin/collections/Collection<@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int>>?| { ^baz this@R|/OuterIntoLocal|.R|/foo|() } @@ -136,4 +136,3 @@ FILE: [ResolvedTo(IMPORTS)] propagationToLocalMemberFunctionScript.kts } } - diff --git a/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/constructor/propagationToLocalMemberFunctionScript.lazyResolve.txt b/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/constructor/propagationToLocalMemberFunctionScript.lazyResolve.txt index 5949bf2dda5..e067b969244 100644 --- a/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/constructor/propagationToLocalMemberFunctionScript.lazyResolve.txt +++ b/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/constructor/propagationToLocalMemberFunctionScript.lazyResolve.txt @@ -434,7 +434,7 @@ FILE: [ResolvedTo(IMPORTS)] propagationToLocalMemberFunctionScript.kts public final const [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] val prop: R|kotlin/String| = String(str) public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] get(): R|kotlin/String| - public final [ResolvedTo(CONTRACTS)] fun bar(): R|@R|util/Anno|((String(bar ), prop#)) kotlin/collections/List<@R|util/Anno|((String(nested bar ), prop#)) kotlin/collections/Collection<@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int>>?| { + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] fun bar(): R|@R|util/Anno|(str = (String(bar ), R|util/prop|)) kotlin/collections/List<@R|util/Anno|(str = (String(nested bar ), R|util/prop|)) kotlin/collections/Collection<@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int>>?| { ^bar Null(null) } @@ -446,15 +446,15 @@ FILE: [ResolvedTo(IMPORTS)] propagationToLocalMemberFunctionScript.kts super() } - public final [ResolvedTo(BODY_RESOLVE)] fun doo(): R|@R|util/Anno|((String(bar ), prop#)) kotlin/collections/List<@R|util/Anno|((String(nested bar ), prop#)) kotlin/collections/Collection<@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int>>?| { + public final [ResolvedTo(BODY_RESOLVE)] fun doo(): R|@R|util/Anno|(str = (String(bar ), R|util/prop|)) kotlin/collections/List<@R|util/Anno|(str = (String(nested bar ), R|util/prop|)) kotlin/collections/Collection<@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int>>?| { ^doo this@R|/OuterIntoLocal|.R|/foo|() } - public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|@R|util/Anno|((String(bar ), prop#)) kotlin/collections/List<@R|util/Anno|((String(nested bar ), prop#)) kotlin/collections/Collection<@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int>>?| { + public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|@R|util/Anno|(str = (String(bar ), R|util/prop|)) kotlin/collections/List<@R|util/Anno|(str = (String(nested bar ), R|util/prop|)) kotlin/collections/Collection<@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int>>?| { ^foo R|util/bar|() } - public final [ResolvedTo(BODY_RESOLVE)] fun baz(): R|@R|util/Anno|((String(bar ), prop#)) kotlin/collections/List<@R|util/Anno|((String(nested bar ), prop#)) kotlin/collections/Collection<@R|util/Anno|((String(nested nested bar ), prop#)) kotlin/Int>>?| { + public final [ResolvedTo(BODY_RESOLVE)] fun baz(): R|@R|util/Anno|(str = (String(bar ), R|util/prop|)) kotlin/collections/List<@R|util/Anno|(str = (String(nested bar ), R|util/prop|)) kotlin/collections/Collection<@R|util/Anno|(str = (String(nested nested bar ), R|util/prop|)) kotlin/Int>>?| { ^baz this@R|/OuterIntoLocal|.R|/foo|() } @@ -551,4 +551,3 @@ FILE: [ResolvedTo(BODY_RESOLVE)] propagationToLocalMemberFunctionScript.kts } } - diff --git a/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/delegate/delegateWithImplicitType.before.txt b/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/delegate/delegateWithImplicitType.before.txt index 6597465830b..c4cc0ca9503 100644 --- a/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/delegate/delegateWithImplicitType.before.txt +++ b/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/delegate/delegateWithImplicitType.before.txt @@ -69,7 +69,7 @@ FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitType.kt } public abstract [ResolvedTo(STATUS)] interface OriginalInterface : R|kotlin/Any| { - @R|Anno|[Types](LAZY_EXPRESSION) public open [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] fun <@R|Anno|[Types](LAZY_EXPRESSION) [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] F : R|@R|Anno|((String(bound ), prop#)) kotlin/collections/List<@R|Anno|((String(nested bound ), prop#)) kotlin/collections/List<@R|Anno|((String(nested nested bound ), prop#)) kotlin/String>>|> @RECEIVER:R|Anno|[Types](LAZY_EXPRESSION) R|@R|Anno|((String(receiver type ), prop#)) kotlin/collections/Collection<@R|Anno|((String(nested receiver type ), prop#)) kotlin/collections/List<@R|Anno|((String(nested nested receiver type ), prop#)) kotlin/String>>|.implicitType([ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] @R|Anno|[Types](LAZY_EXPRESSION) param: R|@R|Anno|((String(parameter type ), prop#)) kotlin/collections/ListIterator<@R|Anno|((String(nested parameter type ), prop#)) kotlin/collections/List<@R|Anno|((String(nested nested parameter type ), prop#)) kotlin/String>>|): R|@R|Anno|((String(explicitType return type ), prop#)) kotlin/collections/List<@R|Anno|((String(explicitType nested return type ), prop#)) kotlin/collections/List<@R|Anno|((String(explicitType nested nested return type ), prop#)) kotlin/Int>>| { + @R|Anno|[Types](LAZY_EXPRESSION) public open [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] [PostponedSymbolsForAnnotationResolutionKey=[FirNamedFunctionSymbol /explicitType]] fun <@R|Anno|[Types](LAZY_EXPRESSION) [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] F : R|@R|Anno|((String(bound ), prop#)) kotlin/collections/List<@R|Anno|((String(nested bound ), prop#)) kotlin/collections/List<@R|Anno|((String(nested nested bound ), prop#)) kotlin/String>>|> @RECEIVER:R|Anno|[Types](LAZY_EXPRESSION) R|@R|Anno|((String(receiver type ), prop#)) kotlin/collections/Collection<@R|Anno|((String(nested receiver type ), prop#)) kotlin/collections/List<@R|Anno|((String(nested nested receiver type ), prop#)) kotlin/String>>|.implicitType([ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] @R|Anno|[Types](LAZY_EXPRESSION) param: R|@R|Anno|((String(parameter type ), prop#)) kotlin/collections/ListIterator<@R|Anno|((String(nested parameter type ), prop#)) kotlin/collections/List<@R|Anno|((String(nested nested parameter type ), prop#)) kotlin/String>>|): R|@R|Anno|((String(explicitType return type ), prop#)) kotlin/collections/List<@R|Anno|((String(explicitType nested return type ), prop#)) kotlin/collections/List<@R|Anno|((String(explicitType nested nested return type ), prop#)) kotlin/Int>>| { ^implicitType R|/explicitType|() } diff --git a/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/delegate/delegateWithImplicitType.lazyResolve.txt b/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/delegate/delegateWithImplicitType.lazyResolve.txt index 77a58edc866..e60be2a87e9 100644 --- a/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/delegate/delegateWithImplicitType.lazyResolve.txt +++ b/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/delegate/delegateWithImplicitType.lazyResolve.txt @@ -109,7 +109,7 @@ FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitType.kt } public abstract [ResolvedTo(STATUS)] interface OriginalInterface : R|kotlin/Any| { - @R|Anno|[Types](LAZY_EXPRESSION) public open [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] fun <@R|Anno|[Types](LAZY_EXPRESSION) [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] F : R|@R|Anno|((String(bound ), prop#)) kotlin/collections/List<@R|Anno|((String(nested bound ), prop#)) kotlin/collections/List<@R|Anno|((String(nested nested bound ), prop#)) kotlin/String>>|> @RECEIVER:R|Anno|[Types](LAZY_EXPRESSION) R|@R|Anno|((String(receiver type ), prop#)) kotlin/collections/Collection<@R|Anno|((String(nested receiver type ), prop#)) kotlin/collections/List<@R|Anno|((String(nested nested receiver type ), prop#)) kotlin/String>>|.implicitType([ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] @R|Anno|[Types](LAZY_EXPRESSION) param: R|@R|Anno|((String(parameter type ), prop#)) kotlin/collections/ListIterator<@R|Anno|((String(nested parameter type ), prop#)) kotlin/collections/List<@R|Anno|((String(nested nested parameter type ), prop#)) kotlin/String>>|): R|@R|Anno|((String(explicitType return type ), prop#)) kotlin/collections/List<@R|Anno|((String(explicitType nested return type ), prop#)) kotlin/collections/List<@R|Anno|((String(explicitType nested nested return type ), prop#)) kotlin/Int>>| { + @R|Anno|[Types](LAZY_EXPRESSION) public open [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] [PostponedSymbolsForAnnotationResolutionKey=[FirNamedFunctionSymbol /explicitType]] fun <@R|Anno|[Types](LAZY_EXPRESSION) [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] F : R|@R|Anno|((String(bound ), prop#)) kotlin/collections/List<@R|Anno|((String(nested bound ), prop#)) kotlin/collections/List<@R|Anno|((String(nested nested bound ), prop#)) kotlin/String>>|> @RECEIVER:R|Anno|[Types](LAZY_EXPRESSION) R|@R|Anno|((String(receiver type ), prop#)) kotlin/collections/Collection<@R|Anno|((String(nested receiver type ), prop#)) kotlin/collections/List<@R|Anno|((String(nested nested receiver type ), prop#)) kotlin/String>>|.implicitType([ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] @R|Anno|[Types](LAZY_EXPRESSION) param: R|@R|Anno|((String(parameter type ), prop#)) kotlin/collections/ListIterator<@R|Anno|((String(nested parameter type ), prop#)) kotlin/collections/List<@R|Anno|((String(nested nested parameter type ), prop#)) kotlin/String>>|): R|@R|Anno|((String(explicitType return type ), prop#)) kotlin/collections/List<@R|Anno|((String(explicitType nested return type ), prop#)) kotlin/collections/List<@R|Anno|((String(explicitType nested nested return type ), prop#)) kotlin/Int>>| { ^implicitType R|/explicitType|() } @@ -119,7 +119,7 @@ FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitType.kt } ANNOTATION_ARGUMENTS: -TARGET: @R|Anno|[Types](position = (String(implicitType ), R|/prop|)) public open [ResolvedTo(ANNOTATION_ARGUMENTS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /OriginalInterface.implicitType, containingClass=Derived, delegateField=FirFieldSymbol /Derived.$$delegate_0] fun <@R|Anno|[Types](position = (String(type param ), R|/prop|)) [ResolvedTo(ANNOTATION_ARGUMENTS)] F : R|@R|Anno|(position = (String(bound ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested bound ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested nested bound ), R|/prop|)) kotlin/String>>|> @RECEIVER:R|Anno|[Types](position = (String(receiver annotation: ), R|/prop|)) R|@R|Anno|(position = (String(receiver type ), R|/prop|)) kotlin/collections/Collection<@R|Anno|(position = (String(nested receiver type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested nested receiver type ), R|/prop|)) kotlin/String>>|.implicitType([ResolvedTo(ANNOTATION_ARGUMENTS)] [SubstitutedOverrideOriginalKey=/param] @R|Anno|[Types](position = (String(parameter annotation ), R|/prop|)) param: R|@R|Anno|(position = (String(parameter type ), R|/prop|)) kotlin/collections/ListIterator<@R|Anno|(position = (String(nested parameter type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested nested parameter type ), R|/prop|)) kotlin/String>>|): R|@R|Anno|((String(explicitType return type ), prop#)) kotlin/collections/List<@R|Anno|((String(explicitType nested return type ), prop#)) kotlin/collections/List<@R|Anno|((String(explicitType nested nested return type ), prop#)) kotlin/Int>>| +TARGET: @R|Anno|[Types](position = (String(implicitType ), R|/prop|)) public open [ResolvedTo(ANNOTATION_ARGUMENTS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /OriginalInterface.implicitType, containingClass=Derived, delegateField=FirFieldSymbol /Derived.$$delegate_0] fun <@R|Anno|[Types](position = (String(type param ), R|/prop|)) [ResolvedTo(ANNOTATION_ARGUMENTS)] F : R|@R|Anno|(position = (String(bound ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested bound ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested nested bound ), R|/prop|)) kotlin/String>>|> @RECEIVER:R|Anno|[Types](position = (String(receiver annotation: ), R|/prop|)) R|@R|Anno|(position = (String(receiver type ), R|/prop|)) kotlin/collections/Collection<@R|Anno|(position = (String(nested receiver type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested nested receiver type ), R|/prop|)) kotlin/String>>|.implicitType([ResolvedTo(ANNOTATION_ARGUMENTS)] [SubstitutedOverrideOriginalKey=/param] @R|Anno|[Types](position = (String(parameter annotation ), R|/prop|)) param: R|@R|Anno|(position = (String(parameter type ), R|/prop|)) kotlin/collections/ListIterator<@R|Anno|(position = (String(nested parameter type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested nested parameter type ), R|/prop|)) kotlin/String>>|): R|@R|Anno|(position = (String(explicitType return type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(explicitType nested return type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(explicitType nested nested return type ), R|/prop|)) kotlin/Int>>| FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitType.kt @R|kotlin/annotation/Target|[Types](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|, Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.FUNCTION|, Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.VALUE_PARAMETER|, Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE_PARAMETER|) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| { @@ -142,17 +142,17 @@ FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitType.kt } public abstract [ResolvedTo(STATUS)] interface OriginalInterface : R|kotlin/Any| { - @R|Anno|[Types](position = (String(implicitType ), R|/prop|)) public open [ResolvedTo(ANNOTATION_ARGUMENTS)] fun <@R|Anno|[Types](position = (String(type param ), R|/prop|)) [ResolvedTo(ANNOTATION_ARGUMENTS)] F : R|@R|Anno|(position = (String(bound ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested bound ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested nested bound ), R|/prop|)) kotlin/String>>|> @RECEIVER:R|Anno|[Types](position = (String(receiver annotation: ), R|/prop|)) R|@R|Anno|(position = (String(receiver type ), R|/prop|)) kotlin/collections/Collection<@R|Anno|(position = (String(nested receiver type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested nested receiver type ), R|/prop|)) kotlin/String>>|.implicitType([ResolvedTo(ANNOTATION_ARGUMENTS)] @R|Anno|[Types](position = (String(parameter annotation ), R|/prop|)) param: R|@R|Anno|(position = (String(parameter type ), R|/prop|)) kotlin/collections/ListIterator<@R|Anno|(position = (String(nested parameter type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested nested parameter type ), R|/prop|)) kotlin/String>>|): R|@R|Anno|((String(explicitType return type ), prop#)) kotlin/collections/List<@R|Anno|((String(explicitType nested return type ), prop#)) kotlin/collections/List<@R|Anno|((String(explicitType nested nested return type ), prop#)) kotlin/Int>>| { + @R|Anno|[Types](position = (String(implicitType ), R|/prop|)) public open [ResolvedTo(ANNOTATION_ARGUMENTS)] fun <@R|Anno|[Types](position = (String(type param ), R|/prop|)) [ResolvedTo(ANNOTATION_ARGUMENTS)] F : R|@R|Anno|(position = (String(bound ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested bound ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested nested bound ), R|/prop|)) kotlin/String>>|> @RECEIVER:R|Anno|[Types](position = (String(receiver annotation: ), R|/prop|)) R|@R|Anno|(position = (String(receiver type ), R|/prop|)) kotlin/collections/Collection<@R|Anno|(position = (String(nested receiver type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested nested receiver type ), R|/prop|)) kotlin/String>>|.implicitType([ResolvedTo(ANNOTATION_ARGUMENTS)] @R|Anno|[Types](position = (String(parameter annotation ), R|/prop|)) param: R|@R|Anno|(position = (String(parameter type ), R|/prop|)) kotlin/collections/ListIterator<@R|Anno|(position = (String(nested parameter type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested nested parameter type ), R|/prop|)) kotlin/String>>|): R|@R|Anno|(position = (String(explicitType return type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(explicitType nested return type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(explicitType nested nested return type ), R|/prop|)) kotlin/Int>>| { ^implicitType R|/explicitType|() } } - public final [ResolvedTo(CONTRACTS)] fun explicitType(): R|@R|Anno|((String(explicitType return type ), prop#)) kotlin/collections/List<@R|Anno|((String(explicitType nested return type ), prop#)) kotlin/collections/List<@R|Anno|((String(explicitType nested nested return type ), prop#)) kotlin/Int>>| { + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] fun explicitType(): R|@R|Anno|(position = (String(explicitType return type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(explicitType nested return type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(explicitType nested nested return type ), R|/prop|)) kotlin/Int>>| { ^explicitType IntegerLiteral(1) } BODY_RESOLVE: -TARGET: @R|Anno|[Types](position = (String(implicitType ), R|/prop|)) public open [ResolvedTo(BODY_RESOLVE)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /OriginalInterface.implicitType, containingClass=Derived, delegateField=FirFieldSymbol /Derived.$$delegate_0] fun <@R|Anno|[Types](position = (String(type param ), R|/prop|)) [ResolvedTo(BODY_RESOLVE)] F : R|@R|Anno|(position = (String(bound ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested bound ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested nested bound ), R|/prop|)) kotlin/String>>|> @RECEIVER:R|Anno|[Types](position = (String(receiver annotation: ), R|/prop|)) R|@R|Anno|(position = (String(receiver type ), R|/prop|)) kotlin/collections/Collection<@R|Anno|(position = (String(nested receiver type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested nested receiver type ), R|/prop|)) kotlin/String>>|.implicitType([ResolvedTo(BODY_RESOLVE)] [SubstitutedOverrideOriginalKey=/param] @R|Anno|[Types](position = (String(parameter annotation ), R|/prop|)) param: R|@R|Anno|(position = (String(parameter type ), R|/prop|)) kotlin/collections/ListIterator<@R|Anno|(position = (String(nested parameter type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested nested parameter type ), R|/prop|)) kotlin/String>>|): R|@R|Anno|((String(explicitType return type ), prop#)) kotlin/collections/List<@R|Anno|((String(explicitType nested return type ), prop#)) kotlin/collections/List<@R|Anno|((String(explicitType nested nested return type ), prop#)) kotlin/Int>>| +TARGET: @R|Anno|[Types](position = (String(implicitType ), R|/prop|)) public open [ResolvedTo(BODY_RESOLVE)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /OriginalInterface.implicitType, containingClass=Derived, delegateField=FirFieldSymbol /Derived.$$delegate_0] fun <@R|Anno|[Types](position = (String(type param ), R|/prop|)) [ResolvedTo(BODY_RESOLVE)] F : R|@R|Anno|(position = (String(bound ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested bound ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested nested bound ), R|/prop|)) kotlin/String>>|> @RECEIVER:R|Anno|[Types](position = (String(receiver annotation: ), R|/prop|)) R|@R|Anno|(position = (String(receiver type ), R|/prop|)) kotlin/collections/Collection<@R|Anno|(position = (String(nested receiver type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested nested receiver type ), R|/prop|)) kotlin/String>>|.implicitType([ResolvedTo(BODY_RESOLVE)] [SubstitutedOverrideOriginalKey=/param] @R|Anno|[Types](position = (String(parameter annotation ), R|/prop|)) param: R|@R|Anno|(position = (String(parameter type ), R|/prop|)) kotlin/collections/ListIterator<@R|Anno|(position = (String(nested parameter type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested nested parameter type ), R|/prop|)) kotlin/String>>|): R|@R|Anno|(position = (String(explicitType return type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(explicitType nested return type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(explicitType nested nested return type ), R|/prop|)) kotlin/Int>>| FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitType.kt @R|kotlin/annotation/Target|[Types](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|, Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.FUNCTION|, Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.VALUE_PARAMETER|, Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE_PARAMETER|) public final [ResolvedTo(STATUS)] annotation class Anno : R|kotlin/Annotation| { @@ -175,12 +175,12 @@ FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitType.kt } public abstract [ResolvedTo(STATUS)] interface OriginalInterface : R|kotlin/Any| { - @R|Anno|[Types](position = (String(implicitType ), R|/prop|)) public open [ResolvedTo(ANNOTATION_ARGUMENTS)] fun <@R|Anno|[Types](position = (String(type param ), R|/prop|)) [ResolvedTo(ANNOTATION_ARGUMENTS)] F : R|@R|Anno|(position = (String(bound ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested bound ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested nested bound ), R|/prop|)) kotlin/String>>|> @RECEIVER:R|Anno|[Types](position = (String(receiver annotation: ), R|/prop|)) R|@R|Anno|(position = (String(receiver type ), R|/prop|)) kotlin/collections/Collection<@R|Anno|(position = (String(nested receiver type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested nested receiver type ), R|/prop|)) kotlin/String>>|.implicitType([ResolvedTo(ANNOTATION_ARGUMENTS)] @R|Anno|[Types](position = (String(parameter annotation ), R|/prop|)) param: R|@R|Anno|(position = (String(parameter type ), R|/prop|)) kotlin/collections/ListIterator<@R|Anno|(position = (String(nested parameter type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested nested parameter type ), R|/prop|)) kotlin/String>>|): R|@R|Anno|((String(explicitType return type ), prop#)) kotlin/collections/List<@R|Anno|((String(explicitType nested return type ), prop#)) kotlin/collections/List<@R|Anno|((String(explicitType nested nested return type ), prop#)) kotlin/Int>>| { + @R|Anno|[Types](position = (String(implicitType ), R|/prop|)) public open [ResolvedTo(ANNOTATION_ARGUMENTS)] fun <@R|Anno|[Types](position = (String(type param ), R|/prop|)) [ResolvedTo(ANNOTATION_ARGUMENTS)] F : R|@R|Anno|(position = (String(bound ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested bound ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested nested bound ), R|/prop|)) kotlin/String>>|> @RECEIVER:R|Anno|[Types](position = (String(receiver annotation: ), R|/prop|)) R|@R|Anno|(position = (String(receiver type ), R|/prop|)) kotlin/collections/Collection<@R|Anno|(position = (String(nested receiver type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested nested receiver type ), R|/prop|)) kotlin/String>>|.implicitType([ResolvedTo(ANNOTATION_ARGUMENTS)] @R|Anno|[Types](position = (String(parameter annotation ), R|/prop|)) param: R|@R|Anno|(position = (String(parameter type ), R|/prop|)) kotlin/collections/ListIterator<@R|Anno|(position = (String(nested parameter type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested nested parameter type ), R|/prop|)) kotlin/String>>|): R|@R|Anno|(position = (String(explicitType return type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(explicitType nested return type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(explicitType nested nested return type ), R|/prop|)) kotlin/Int>>| { ^implicitType R|/explicitType|() } } - public final [ResolvedTo(CONTRACTS)] fun explicitType(): R|@R|Anno|((String(explicitType return type ), prop#)) kotlin/collections/List<@R|Anno|((String(explicitType nested return type ), prop#)) kotlin/collections/List<@R|Anno|((String(explicitType nested nested return type ), prop#)) kotlin/Int>>| { + public final [ResolvedTo(ANNOTATION_ARGUMENTS)] fun explicitType(): R|@R|Anno|(position = (String(explicitType return type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(explicitType nested return type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(explicitType nested nested return type ), R|/prop|)) kotlin/Int>>| { ^explicitType IntegerLiteral(1) } diff --git a/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/delegate/delegateWithImplicitTypeScript.before.txt b/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/delegate/delegateWithImplicitTypeScript.before.txt index 8312f17e5e0..d01baf12e46 100644 --- a/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/delegate/delegateWithImplicitTypeScript.before.txt +++ b/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/delegate/delegateWithImplicitTypeScript.before.txt @@ -76,7 +76,7 @@ FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitTypeScript.kts } public abstract [ResolvedTo(STATUS)] interface OriginalInterface : R|kotlin/Any| { - @R|Anno|[Types](LAZY_EXPRESSION) public open [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] fun <@R|Anno|[Types](LAZY_EXPRESSION) [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] F : R|@R|Anno|((String(bound ), prop#)) kotlin/collections/List<@R|Anno|((String(nested bound ), prop#)) kotlin/collections/List<@R|Anno|((String(nested nested bound ), prop#)) kotlin/String>>|> @RECEIVER:R|Anno|[Types](LAZY_EXPRESSION) R|@R|Anno|((String(receiver type ), prop#)) kotlin/collections/Collection<@R|Anno|((String(nested receiver type ), prop#)) kotlin/collections/List<@R|Anno|((String(nested nested receiver type ), prop#)) kotlin/String>>|.implicitType([ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] @R|Anno|[Types](LAZY_EXPRESSION) param: R|@R|Anno|((String(parameter type ), prop#)) kotlin/collections/ListIterator<@R|Anno|((String(nested parameter type ), prop#)) kotlin/collections/List<@R|Anno|((String(nested nested parameter type ), prop#)) kotlin/String>>|): R|@R|Anno|((String(explicitType return type ), prop#)) kotlin/collections/List<@R|Anno|((String(explicitType nested return type ), prop#)) kotlin/collections/List<@R|Anno|((String(explicitType nested nested return type ), prop#)) kotlin/Int>>| { + @R|Anno|[Types](LAZY_EXPRESSION) public open [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] [PostponedSymbolsForAnnotationResolutionKey=[FirNamedFunctionSymbol /explicitType]] fun <@R|Anno|[Types](LAZY_EXPRESSION) [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] F : R|@R|Anno|((String(bound ), prop#)) kotlin/collections/List<@R|Anno|((String(nested bound ), prop#)) kotlin/collections/List<@R|Anno|((String(nested nested bound ), prop#)) kotlin/String>>|> @RECEIVER:R|Anno|[Types](LAZY_EXPRESSION) R|@R|Anno|((String(receiver type ), prop#)) kotlin/collections/Collection<@R|Anno|((String(nested receiver type ), prop#)) kotlin/collections/List<@R|Anno|((String(nested nested receiver type ), prop#)) kotlin/String>>|.implicitType([ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] @R|Anno|[Types](LAZY_EXPRESSION) param: R|@R|Anno|((String(parameter type ), prop#)) kotlin/collections/ListIterator<@R|Anno|((String(nested parameter type ), prop#)) kotlin/collections/List<@R|Anno|((String(nested nested parameter type ), prop#)) kotlin/String>>|): R|@R|Anno|((String(explicitType return type ), prop#)) kotlin/collections/List<@R|Anno|((String(explicitType nested return type ), prop#)) kotlin/collections/List<@R|Anno|((String(explicitType nested nested return type ), prop#)) kotlin/Int>>| { ^implicitType R|/explicitType|() } diff --git a/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/delegate/delegateWithImplicitTypeScript.lazyResolve.txt b/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/delegate/delegateWithImplicitTypeScript.lazyResolve.txt index b2f73df7f27..1d4080e9eb6 100644 --- a/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/delegate/delegateWithImplicitTypeScript.lazyResolve.txt +++ b/analysis/low-level-api-fir/testData/lazyResolveTypeAnnotations/delegate/delegateWithImplicitTypeScript.lazyResolve.txt @@ -143,7 +143,7 @@ FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitTypeScript.kts } public abstract [ResolvedTo(STATUS)] interface OriginalInterface : R|kotlin/Any| { - @R|Anno|[Types](LAZY_EXPRESSION) public open [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] fun <@R|Anno|[Types](LAZY_EXPRESSION) [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] F : R|@R|Anno|((String(bound ), prop#)) kotlin/collections/List<@R|Anno|((String(nested bound ), prop#)) kotlin/collections/List<@R|Anno|((String(nested nested bound ), prop#)) kotlin/String>>|> @RECEIVER:R|Anno|[Types](LAZY_EXPRESSION) R|@R|Anno|((String(receiver type ), prop#)) kotlin/collections/Collection<@R|Anno|((String(nested receiver type ), prop#)) kotlin/collections/List<@R|Anno|((String(nested nested receiver type ), prop#)) kotlin/String>>|.implicitType([ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] @R|Anno|[Types](LAZY_EXPRESSION) param: R|@R|Anno|((String(parameter type ), prop#)) kotlin/collections/ListIterator<@R|Anno|((String(nested parameter type ), prop#)) kotlin/collections/List<@R|Anno|((String(nested nested parameter type ), prop#)) kotlin/String>>|): R|@R|Anno|((String(explicitType return type ), prop#)) kotlin/collections/List<@R|Anno|((String(explicitType nested return type ), prop#)) kotlin/collections/List<@R|Anno|((String(explicitType nested nested return type ), prop#)) kotlin/Int>>| { + @R|Anno|[Types](LAZY_EXPRESSION) public open [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] [PostponedSymbolsForAnnotationResolutionKey=[FirNamedFunctionSymbol /explicitType]] fun <@R|Anno|[Types](LAZY_EXPRESSION) [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] F : R|@R|Anno|((String(bound ), prop#)) kotlin/collections/List<@R|Anno|((String(nested bound ), prop#)) kotlin/collections/List<@R|Anno|((String(nested nested bound ), prop#)) kotlin/String>>|> @RECEIVER:R|Anno|[Types](LAZY_EXPRESSION) R|@R|Anno|((String(receiver type ), prop#)) kotlin/collections/Collection<@R|Anno|((String(nested receiver type ), prop#)) kotlin/collections/List<@R|Anno|((String(nested nested receiver type ), prop#)) kotlin/String>>|.implicitType([ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] @R|Anno|[Types](LAZY_EXPRESSION) param: R|@R|Anno|((String(parameter type ), prop#)) kotlin/collections/ListIterator<@R|Anno|((String(nested parameter type ), prop#)) kotlin/collections/List<@R|Anno|((String(nested nested parameter type ), prop#)) kotlin/String>>|): R|@R|Anno|((String(explicitType return type ), prop#)) kotlin/collections/List<@R|Anno|((String(explicitType nested return type ), prop#)) kotlin/collections/List<@R|Anno|((String(explicitType nested nested return type ), prop#)) kotlin/Int>>| { ^implicitType R|/explicitType|() } @@ -155,7 +155,7 @@ FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitTypeScript.kts ANNOTATION_ARGUMENTS: -TARGET: @R|Anno|[Types](position = (String(implicitType ), R|/prop|)) public open [ResolvedTo(ANNOTATION_ARGUMENTS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /OriginalInterface.implicitType, containingClass=Derived, delegateField=FirFieldSymbol /Derived.$$delegate_0] fun <@R|Anno|[Types](position = (String(type param ), R|/prop|)) [ResolvedTo(ANNOTATION_ARGUMENTS)] F : R|@R|Anno|(position = (String(bound ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested bound ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested nested bound ), R|/prop|)) kotlin/String>>|> @RECEIVER:R|Anno|[Types](position = (String(receiver annotation: ), R|/prop|)) R|@R|Anno|(position = (String(receiver type ), R|/prop|)) kotlin/collections/Collection<@R|Anno|(position = (String(nested receiver type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested nested receiver type ), R|/prop|)) kotlin/String>>|.implicitType([ResolvedTo(ANNOTATION_ARGUMENTS)] [SubstitutedOverrideOriginalKey=/param] @R|Anno|[Types](position = (String(parameter annotation ), R|/prop|)) param: R|@R|Anno|(position = (String(parameter type ), R|/prop|)) kotlin/collections/ListIterator<@R|Anno|(position = (String(nested parameter type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested nested parameter type ), R|/prop|)) kotlin/String>>|): R|@R|Anno|((String(explicitType return type ), prop#)) kotlin/collections/List<@R|Anno|((String(explicitType nested return type ), prop#)) kotlin/collections/List<@R|Anno|((String(explicitType nested nested return type ), prop#)) kotlin/Int>>| +TARGET: @R|Anno|[Types](position = (String(implicitType ), R|/prop|)) public open [ResolvedTo(ANNOTATION_ARGUMENTS)] [DelegatedWrapperDataKey=[wrapped=FirNamedFunctionSymbol /OriginalInterface.implicitType, containingClass=Derived, delegateField=FirFieldSymbol /Derived.$$delegate_0] fun <@R|Anno|[Types](position = (String(type param ), R|/prop|)) [ResolvedTo(ANNOTATION_ARGUMENTS)] F : R|@R|Anno|(position = (String(bound ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested bound ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested nested bound ), R|/prop|)) kotlin/String>>|> @RECEIVER:R|Anno|[Types](position = (String(receiver annotation: ), R|/prop|)) R|@R|Anno|(position = (String(receiver type ), R|/prop|)) kotlin/collections/Collection<@R|Anno|(position = (String(nested receiver type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested nested receiver type ), R|/prop|)) kotlin/String>>|.implicitType([ResolvedTo(ANNOTATION_ARGUMENTS)] [SubstitutedOverrideOriginalKey=/param] @R|Anno|[Types](position = (String(parameter annotation ), R|/prop|)) param: R|@R|Anno|(position = (String(parameter type ), R|/prop|)) kotlin/collections/ListIterator<@R|Anno|(position = (String(nested parameter type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(nested nested parameter type ), R|/prop|)) kotlin/String>>|): R|@R|Anno|(position = (String(explicitType return type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(explicitType nested return type ), R|/prop|)) kotlin/collections/List<@R|Anno|(position = (String(explicitType nested nested return type ), R|/prop|)) kotlin/Int>>| FILE: [ResolvedTo(IMPORTS)] delegateWithImplicitTypeScript.kts context(