From c7729689c4145c3dd748298a77087fd456dd1e9b Mon Sep 17 00:00:00 2001 From: Ilya Kirillov Date: Thu, 20 Jan 2022 19:01:35 +0100 Subject: [PATCH] LL API: always create FirFile with lazy bodies --- .../LowLevelFirApiFacadeForResolveOnAir.kt | 1 - .../fir/element/builder/FirElementBuilder.kt | 2 +- .../api/fir/file/builder/FirFileBuilder.kt | 3 +- .../api/fir/file/structure/FileStructure.kt | 2 +- .../RawFirNonLocalDeclarationBuilder.kt | 25 +- .../api/fir/providers/FirProviderHelper.kt | 4 +- .../level/api/fir/util/declarationUtils.kt | 6 +- .../lazyResolve/annotationParameters.txt | 415 +--------- .../testdata/lazyResolve/annotations.txt | 79 +- .../testdata/lazyResolve/classMembers.txt | 392 +--------- .../testdata/lazyResolve/delegates.txt | 738 ++---------------- .../lazyResolve/functionWithParameter.txt | 105 +-- .../lazyResolve/parameterOfNonLocalSetter.txt | 187 +---- .../lazyResolve/propertyWithGetter.txt | 208 +---- .../propertyWithGetterAndSetter.txt | 308 +------- .../lazyResolve/propertyWithInitializer.txt | 123 +-- .../lazyResolve/secondaryConstructor.txt | 202 +---- .../testdata/lazyResolve/superTypes.txt | 169 +--- .../testdata/lazyResolve/superTypesLoop.txt | 217 +---- .../lazyResolve/topLevelFunctions.txt | 198 +---- ...tionsWithExpressionBodyAndExplicitType.txt | 198 +---- .../topLevelFunctionsWithImplicitType.txt | 194 +---- .../typeParameterOfNonLocalFunction.txt | 103 +-- .../typeParameterOfTopFunction.txt | 54 +- .../lazyResolve/typeParameterOfTopSetter.txt | 117 +-- .../converter/DeclarationsConverter.kt | 6 +- .../kotlin/fir/builder/RawFirBuilder.kt | 13 +- .../kotlin/fir/builder/BaseFirBuilder.kt | 17 +- 28 files changed, 403 insertions(+), 3683 deletions(-) diff --git a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/api/LowLevelFirApiFacadeForResolveOnAir.kt b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/api/LowLevelFirApiFacadeForResolveOnAir.kt index 56e112a4399..a587883c37c 100644 --- a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/api/LowLevelFirApiFacadeForResolveOnAir.kt +++ b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/api/LowLevelFirApiFacadeForResolveOnAir.kt @@ -125,7 +125,6 @@ object LowLevelFirApiFacadeForResolveOnAir { val firFile = session.firFileBuilder.buildRawFirFileWithCaching( ktFile = file, cache = session.cache, - preferLazyBodies = true ) state.firLazyDeclarationResolver.lazyResolveFileDeclaration( diff --git a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/element/builder/FirElementBuilder.kt b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/element/builder/FirElementBuilder.kt index e9470c24044..6ad95fcebce 100644 --- a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/element/builder/FirElementBuilder.kt +++ b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/element/builder/FirElementBuilder.kt @@ -78,7 +78,7 @@ internal class FirElementBuilder { moduleFileCache: ModuleFileCache, firLazyDeclarationResolver: FirLazyDeclarationResolver ): FirFile { - val firFile = firFileBuilder.buildRawFirFileWithCaching(ktFile, moduleFileCache, preferLazyBodies = false) + val firFile = firFileBuilder.buildRawFirFileWithCaching(ktFile, moduleFileCache) firLazyDeclarationResolver.lazyResolveFileDeclaration( firFile = firFile, moduleFileCache = moduleFileCache, diff --git a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/file/builder/FirFileBuilder.kt b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/file/builder/FirFileBuilder.kt index 2f53db0835c..a5f5def0180 100644 --- a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/file/builder/FirFileBuilder.kt +++ b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/file/builder/FirFileBuilder.kt @@ -30,13 +30,12 @@ internal class FirFileBuilder( fun buildRawFirFileWithCaching( ktFile: KtFile, cache: ModuleFileCache, - preferLazyBodies: Boolean ): FirFile = cache.fileCached(ktFile) { RawFirBuilder( cache.session, scopeProvider, psiMode = PsiHandlingMode.IDE, - bodyBuildingMode = BodyBuildingMode.lazyBodies(preferLazyBodies) + bodyBuildingMode = BodyBuildingMode.LAZY_BODIES ).buildFirFile(ktFile) } } diff --git a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/FileStructure.kt b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/FileStructure.kt index 718d8c91a2d..21534f0af00 100644 --- a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/FileStructure.kt +++ b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/FileStructure.kt @@ -35,7 +35,7 @@ internal class FileStructure private constructor( firFileBuilder: FirFileBuilder, moduleFileCache: ModuleFileCache, ): FileStructure { - val firFile = firFileBuilder.buildRawFirFileWithCaching(ktFile, moduleFileCache, preferLazyBodies = false) + val firFile = firFileBuilder.buildRawFirFileWithCaching(ktFile, moduleFileCache) return FileStructure(ktFile, firFile, firLazyDeclarationResolver, firFileBuilder, moduleFileCache) } } diff --git a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/lazy/resolve/RawFirNonLocalDeclarationBuilder.kt b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/lazy/resolve/RawFirNonLocalDeclarationBuilder.kt index de76002ccf2..6a7c3b8fb5e 100644 --- a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/lazy/resolve/RawFirNonLocalDeclarationBuilder.kt +++ b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/lazy/resolve/RawFirNonLocalDeclarationBuilder.kt @@ -6,6 +6,7 @@ package org.jetbrains.kotlin.analysis.low.level.api.fir.lazy.resolve import com.intellij.psi.PsiElement +import org.jetbrains.kotlin.KtSourceElement import org.jetbrains.kotlin.analysis.low.level.api.fir.api.FirDeclarationDesignation import org.jetbrains.kotlin.fir.* import org.jetbrains.kotlin.fir.builder.BodyBuildingMode @@ -13,17 +14,19 @@ import org.jetbrains.kotlin.fir.builder.PsiHandlingMode import org.jetbrains.kotlin.fir.builder.RawFirBuilder import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.declarations.utils.isInner +import org.jetbrains.kotlin.fir.expressions.FirAnnotation import org.jetbrains.kotlin.fir.scopes.FirScopeProvider import org.jetbrains.kotlin.fir.symbols.impl.FirClassSymbol import org.jetbrains.kotlin.fir.types.FirResolvedTypeRef import org.jetbrains.kotlin.fir.types.FirTypeRef -import org.jetbrains.kotlin.fir.expressions.FirAnnotation +import org.jetbrains.kotlin.psi import org.jetbrains.kotlin.psi.* import org.jetbrains.kotlin.psi.psiUtil.hasExpectModifier internal class RawFirNonLocalDeclarationBuilder private constructor( session: FirSession, baseScopeProvider: FirScopeProvider, + private val originalDeclaration: FirTypeParameterRefsOwner, private val declarationToBuild: KtDeclaration, private val functionsToRebind: Set? = null, private val replacementApplier: RawFirReplacement.Applier? = null @@ -41,6 +44,7 @@ internal class RawFirNonLocalDeclarationBuilder private constructor( val builder = RawFirNonLocalDeclarationBuilder( session = session, baseScopeProvider = scopeProvider, + originalDeclaration = designation.declaration as FirTypeParameterRefsOwner, declarationToBuild = rootNonLocalDeclaration, replacementApplier = replacementApplier ) @@ -65,6 +69,7 @@ internal class RawFirNonLocalDeclarationBuilder private constructor( val builder = RawFirNonLocalDeclarationBuilder( session = session, baseScopeProvider = scopeProvider, + originalDeclaration = designation.declaration as FirTypeParameterRefsOwner, declarationToBuild = rootNonLocalDeclaration, functionsToRebind = functionsToRebind, ) @@ -78,6 +83,18 @@ internal class RawFirNonLocalDeclarationBuilder private constructor( super.bindFunctionTarget(target, rewrittenTarget) } + override fun addCapturedTypeParameters( + status: Boolean, + declarationSource: KtSourceElement?, + currentFirTypeParameters: List + ) { + if (declarationSource?.psi == originalDeclaration.psi) { + super.addCapturedTypeParameters(status, declarationSource, originalDeclaration.typeParameters) + } else { + super.addCapturedTypeParameters(status, declarationSource, currentFirTypeParameters) + } + } + private inner class VisitorWithReplacement : Visitor() { override fun convertElement(element: KtElement): FirElement? = super.convertElement(replacementApplier?.tryReplace(element) ?: element) @@ -133,7 +150,11 @@ internal class RawFirNonLocalDeclarationBuilder private constructor( check(classOrObject is KtClassOrObject) withChildClassName(classOrObject.nameAsSafeName, isExpect = classOrObject.hasExpectModifier() || context.containerIsExpect) { - withCapturedTypeParameters(parent.isInner, parent.typeParameters.subList(0, classOrObject.typeParameters.size)) { + withCapturedTypeParameters( + parent.isInner, + declarationSource = null, + parent.typeParameters.subList(0, classOrObject.typeParameters.size) + ) { registerSelfType(classOrObject.toDelegatedSelfType(parent)) return moveNext(iterator, parent) } diff --git a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/providers/FirProviderHelper.kt b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/providers/FirProviderHelper.kt index 965a6c3bf9e..3d6bad7aff0 100644 --- a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/providers/FirProviderHelper.kt +++ b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/providers/FirProviderHelper.kt @@ -39,7 +39,7 @@ internal class FirProviderHelper( null -> declarationProvider.getTypeAliasesByClassId(classId).firstOrNull() else -> if (klass.getClassId() == null) null else klass } ?: return@computeIfAbsent Optional.empty() - val firFile = firFileBuilder.buildRawFirFileWithCaching(ktClass.containingKtFile, cache, preferLazyBodies = true) + val firFile = firFileBuilder.buildRawFirFileWithCaching(ktClass.containingKtFile, cache) val classifier = FirElementFinder.findElementIn(firFile) { classifier -> classifier.symbol.classId == classId } @@ -61,7 +61,7 @@ internal class FirProviderHelper( @OptIn(ExperimentalStdlibApi::class) buildList { files.forEach { ktFile -> - val firFile = firFileBuilder.buildRawFirFileWithCaching(ktFile, cache, preferLazyBodies = true) + val firFile = firFileBuilder.buildRawFirFileWithCaching(ktFile, cache) firFile.collectCallableDeclarationsTo(this, name) } } diff --git a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/util/declarationUtils.kt b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/util/declarationUtils.kt index 449d8ffbf00..7033368fdd5 100644 --- a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/util/declarationUtils.kt +++ b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/util/declarationUtils.kt @@ -41,7 +41,7 @@ internal fun KtDeclaration.findFirDeclarationForAnyFirSourceDeclaration( ): FirDeclaration { val nonLocalDeclaration = getNonLocalContainingOrThisDeclaration() ?.findSourceNonLocalFirDeclaration(firFileBuilder, firSymbolProvider, moduleFileCache) - ?: firFileBuilder.buildRawFirFileWithCaching(containingKtFile, moduleFileCache, preferLazyBodies = true) + ?: firFileBuilder.buildRawFirFileWithCaching(containingKtFile, moduleFileCache) val originalDeclaration = originalDeclaration val fir = FirElementFinder.findElementIn(nonLocalDeclaration) { firDeclaration -> firDeclaration.psi == this || firDeclaration.psi == originalDeclaration @@ -65,7 +65,7 @@ private fun KtDeclaration.findSourceOfNonLocalFirDeclarationByTraversingWholeTre moduleFileCache: ModuleFileCache, containerFirFile: FirFile?, ): FirDeclaration? { - val firFile = containerFirFile ?: firFileBuilder.buildRawFirFileWithCaching(containingKtFile, moduleFileCache, preferLazyBodies = true) + val firFile = containerFirFile ?: firFileBuilder.buildRawFirFileWithCaching(containingKtFile, moduleFileCache) val originalDeclaration = originalDeclaration return FirElementFinder.findElementIn(firFile, goInside = { it is FirRegularClass }) { firDeclaration -> firDeclaration.psi == this || firDeclaration.psi == originalDeclaration @@ -87,7 +87,7 @@ private fun KtDeclaration.findSourceNonLocalFirDeclarationByProvider( containerClassFir?.declarations } else { val ktFile = containingKtFile - val firFile = containerFirFile ?: firFileBuilder.buildRawFirFileWithCaching(ktFile, moduleFileCache, preferLazyBodies = true) + val firFile = containerFirFile ?: firFileBuilder.buildRawFirFileWithCaching(ktFile, moduleFileCache) firFile.declarations } val original = originalDeclaration diff --git a/analysis/low-level-api-fir/testdata/lazyResolve/annotationParameters.txt b/analysis/low-level-api-fir/testdata/lazyResolve/annotationParameters.txt index ce7331db68a..c29c72bffd3 100644 --- a/analysis/low-level-api-fir/testdata/lazyResolve/annotationParameters.txt +++ b/analysis/low-level-api-fir/testdata/lazyResolve/annotationParameters.txt @@ -28,11 +28,9 @@ FILE: annotationParameters.kt super() } - @Anno(X#.A#) public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - } + @Anno(X#.A#) public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } - @Anno(X#.A#) public? final? [RAW_FIR] fun foo(): R|kotlin/Unit| { - } + @Anno(X#.A#) public? final? [RAW_FIR] fun foo(): R|kotlin/Unit| { LAZY_BLOCK } } @@ -65,11 +63,9 @@ FILE: annotationParameters.kt super() } - @Anno(X#.A#) public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - } + @Anno(X#.A#) public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } - @Anno(X#.A#) public? final? [RAW_FIR] fun foo(): R|kotlin/Unit| { - } + @Anno(X#.A#) public? final? [RAW_FIR] fun foo(): R|kotlin/Unit| { LAZY_BLOCK } } @@ -102,11 +98,9 @@ FILE: annotationParameters.kt super() } - @Anno(X#.A#) public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { - } + @Anno(X#.A#) public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } - @Anno(X#.A#) public? final? [RAW_FIR] fun foo(): R|kotlin/Unit| { - } + @Anno(X#.A#) public? final? [RAW_FIR] fun foo(): R|kotlin/Unit| { LAZY_BLOCK } } @@ -139,11 +133,9 @@ FILE: annotationParameters.kt super() } - @R|Anno|(X#.A#) public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - } + @R|Anno|(X#.A#) public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } - @Anno(X#.A#) public? final? [SUPER_TYPES] fun foo(): R|kotlin/Unit| { - } + @Anno(X#.A#) public? final? [SUPER_TYPES] fun foo(): R|kotlin/Unit| { LAZY_BLOCK } } @@ -176,11 +168,9 @@ FILE: annotationParameters.kt super() } - @R|Anno|(X#.A#) public final [STATUS] fun resolveMe(): R|kotlin/Unit| { - } + @R|Anno|(X#.A#) public final [STATUS] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } - @Anno(X#.A#) public? final? [SUPER_TYPES] fun foo(): R|kotlin/Unit| { - } + @Anno(X#.A#) public? final? [SUPER_TYPES] fun foo(): R|kotlin/Unit| { LAZY_BLOCK } } @@ -213,11 +203,9 @@ FILE: annotationParameters.kt super() } - @R|Anno|(Q|X|.R|/X.A|) public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { - } + @R|Anno|(Q|X|.R|/X.A|) public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } - @Anno(X#.A#) public? final? [SUPER_TYPES] fun foo(): R|kotlin/Unit| { - } + @Anno(X#.A#) public? final? [SUPER_TYPES] fun foo(): R|kotlin/Unit| { LAZY_BLOCK } } @@ -253,8 +241,7 @@ FILE: annotationParameters.kt @R|Anno|(Q|X|.R|/X.A|) public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { } - @Anno(X#.A#) public? final? [SUPER_TYPES] fun foo(): R|kotlin/Unit| { - } + @Anno(X#.A#) public? final? [SUPER_TYPES] fun foo(): R|kotlin/Unit| { LAZY_BLOCK } } @@ -290,8 +277,7 @@ FILE: annotationParameters.kt @R|Anno|(Q|X|.R|/X.A|) public final [IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { } - @R|Anno|(X#.A#) public final [STATUS] fun foo(): R|kotlin/Unit| { - } + @R|Anno|(X#.A#) public final [STATUS] fun foo(): R|kotlin/Unit| { LAZY_BLOCK } } @@ -327,378 +313,7 @@ FILE: annotationParameters.kt @R|Anno|(args = Q|X|.R|/X.A|) public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { } - @R|Anno|(X#.A#) public final [STATUS] fun foo(): R|kotlin/Unit| { - } - - } - -NoResolve: -FILE: annotationParameters.kt - public? final? [RAW_FIR] enum class X : R|kotlin/Enum| { - private [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { - super|>() - } - - public final static [RAW_FIR] [ContainingClassKey=X] enum entry A: R|X| - public final static [BODY_RESOLVE] [ContainingClassKey=X] fun values(): R|kotlin/Array| { - } - - public final static [BODY_RESOLVE] [ContainingClassKey=X] fun valueOf([BODY_RESOLVE] value: R|kotlin/String|): R|X| { - } - - } - public? final? [RAW_FIR] annotation class Anno : R|kotlin/Annotation| { - public? [RAW_FIR] [ContainingClassKey=Anno] constructor([RAW_FIR] [CorrespondingProperty=/Anno.args] args: A.X): R|Anno| { - super() - } - - public? final? [RAW_FIR] [IsFromPrimaryConstructor=true] val args: A.X = R|/args| - [TYPES] [ContainingClassKey=Anno] public? get(): A.X - - } - public? final? [RAW_FIR] class B : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { - super() - } - - @Anno(X#.A#) public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - } - - @Anno(X#.A#) public? final? [RAW_FIR] fun foo(): R|kotlin/Unit| { - } - - } - -BodyResolveWithChildren: -FILE: annotationParameters.kt - public final [STATUS] enum class X : R|kotlin/Enum| { - private [STATUS] [ContainingClassKey=X] constructor(): R|X| { - super|>() - } - - public final static [STATUS] [ContainingClassKey=X] enum entry A: R|X| - public final static [BODY_RESOLVE] [ContainingClassKey=X] fun values(): R|kotlin/Array| { - } - - public final static [BODY_RESOLVE] [ContainingClassKey=X] fun valueOf([BODY_RESOLVE] value: R|kotlin/String|): R|X| { - } - - } - public final [SUPER_TYPES] annotation class Anno : R|kotlin/Annotation| { - public [STATUS] [ContainingClassKey=Anno] constructor([RAW_FIR] [CorrespondingProperty=/Anno.args] args: ): R|Anno| { - super() - } - - public? final? [SUPER_TYPES] [IsFromPrimaryConstructor=true] val args: A.X = R|/args| - [TYPES] [ContainingClassKey=Anno] public? get(): A.X - - } - public final [STATUS] class B : R|kotlin/Any| { - public [STATUS] [ContainingClassKey=B] constructor(): R|B| { - super() - } - - @R|Anno|(args = Q|X|.R|/X.A|) public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { - } - - @R|Anno|(X#.A#) public final [STATUS] fun foo(): R|kotlin/Unit| { - } - - } - -CallableBodyResolve: -FILE: annotationParameters.kt - public final [STATUS] enum class X : R|kotlin/Enum| { - private [STATUS] [ContainingClassKey=X] constructor(): R|X| { - super|>() - } - - public final static [STATUS] [ContainingClassKey=X] enum entry A: R|X| - public final static [BODY_RESOLVE] [ContainingClassKey=X] fun values(): R|kotlin/Array| { - } - - public final static [BODY_RESOLVE] [ContainingClassKey=X] fun valueOf([BODY_RESOLVE] value: R|kotlin/String|): R|X| { - } - - } - public final [SUPER_TYPES] annotation class Anno : R|kotlin/Annotation| { - public [STATUS] [ContainingClassKey=Anno] constructor([RAW_FIR] [CorrespondingProperty=/Anno.args] args: ): R|Anno| { - super() - } - - public? final? [SUPER_TYPES] [IsFromPrimaryConstructor=true] val args: A.X = R|/args| - [TYPES] [ContainingClassKey=Anno] public? get(): A.X - - } - public final [STATUS] class B : R|kotlin/Any| { - public [STATUS] [ContainingClassKey=B] constructor(): R|B| { - super() - } - - @R|Anno|(args = Q|X|.R|/X.A|) public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { - } - - @R|Anno|(X#.A#) public final [STATUS] fun foo(): R|kotlin/Unit| { - } - - } - -CallableReturnType: -FILE: annotationParameters.kt - public? final? [RAW_FIR] enum class X : R|kotlin/Enum| { - private [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { - super|>() - } - - public final static [RAW_FIR] [ContainingClassKey=X] enum entry A: R|X| - public final static [BODY_RESOLVE] [ContainingClassKey=X] fun values(): R|kotlin/Array| { - } - - public final static [BODY_RESOLVE] [ContainingClassKey=X] fun valueOf([BODY_RESOLVE] value: R|kotlin/String|): R|X| { - } - - } - public? final? [RAW_FIR] annotation class Anno : R|kotlin/Annotation| { - public? [RAW_FIR] [ContainingClassKey=Anno] constructor([RAW_FIR] [CorrespondingProperty=/Anno.args] args: A.X): R|Anno| { - super() - } - - public? final? [RAW_FIR] [IsFromPrimaryConstructor=true] val args: A.X = R|/args| - [TYPES] [ContainingClassKey=Anno] public? get(): A.X - - } - public? final? [RAW_FIR] class B : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { - super() - } - - @Anno(X#.A#) public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - } - - @Anno(X#.A#) public? final? [RAW_FIR] fun foo(): R|kotlin/Unit| { - } - - } - -AnnotationType: -FILE: annotationParameters.kt - public? final? [RAW_FIR] enum class X : R|kotlin/Enum| { - private [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { - super|>() - } - - public final static [RAW_FIR] [ContainingClassKey=X] enum entry A: R|X| - public final static [BODY_RESOLVE] [ContainingClassKey=X] fun values(): R|kotlin/Array| { - } - - public final static [BODY_RESOLVE] [ContainingClassKey=X] fun valueOf([BODY_RESOLVE] value: R|kotlin/String|): R|X| { - } - - } - public? final? [RAW_FIR] annotation class Anno : R|kotlin/Annotation| { - public? [RAW_FIR] [ContainingClassKey=Anno] constructor([RAW_FIR] [CorrespondingProperty=/Anno.args] args: A.X): R|Anno| { - super() - } - - public? final? [RAW_FIR] [IsFromPrimaryConstructor=true] val args: A.X = R|/args| - [TYPES] [ContainingClassKey=Anno] public? get(): A.X - - } - public? final? [SUPER_TYPES] class B : R|kotlin/Any| { - public? [SUPER_TYPES] [ContainingClassKey=B] constructor(): R|B| { - super() - } - - @R|Anno|(X#.A#) public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - } - - @Anno(X#.A#) public? final? [SUPER_TYPES] fun foo(): R|kotlin/Unit| { - } - - } - -AnnotationsArguments: -FILE: annotationParameters.kt - public final [STATUS] enum class X : R|kotlin/Enum| { - private [STATUS] [ContainingClassKey=X] constructor(): R|X| { - super|>() - } - - public final static [STATUS] [ContainingClassKey=X] enum entry A: R|X| - public final static [BODY_RESOLVE] [ContainingClassKey=X] fun values(): R|kotlin/Array| { - } - - public final static [BODY_RESOLVE] [ContainingClassKey=X] fun valueOf([BODY_RESOLVE] value: R|kotlin/String|): R|X| { - } - - } - public? final? [RAW_FIR] annotation class Anno : R|kotlin/Annotation| { - public? [RAW_FIR] [ContainingClassKey=Anno] constructor([RAW_FIR] [CorrespondingProperty=/Anno.args] args: A.X): R|Anno| { - super() - } - - public? final? [RAW_FIR] [IsFromPrimaryConstructor=true] val args: A.X = R|/args| - [TYPES] [ContainingClassKey=Anno] public? get(): A.X - - } - public final [SUPER_TYPES] class B : R|kotlin/Any| { - public? [SUPER_TYPES] [ContainingClassKey=B] constructor(): R|B| { - super() - } - - @R|Anno|(Q|X|.R|/X.A|) public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { - } - - @Anno(X#.A#) public? final? [SUPER_TYPES] fun foo(): R|kotlin/Unit| { - } - - } - -CallableContracts: -FILE: annotationParameters.kt - public final [STATUS] enum class X : R|kotlin/Enum| { - private [STATUS] [ContainingClassKey=X] constructor(): R|X| { - super|>() - } - - public final static [STATUS] [ContainingClassKey=X] enum entry A: R|X| - public final static [BODY_RESOLVE] [ContainingClassKey=X] fun values(): R|kotlin/Array| { - } - - public final static [BODY_RESOLVE] [ContainingClassKey=X] fun valueOf([BODY_RESOLVE] value: R|kotlin/String|): R|X| { - } - - } - public? final? [RAW_FIR] annotation class Anno : R|kotlin/Annotation| { - public? [RAW_FIR] [ContainingClassKey=Anno] constructor([RAW_FIR] [CorrespondingProperty=/Anno.args] args: A.X): R|Anno| { - super() - } - - public? final? [RAW_FIR] [IsFromPrimaryConstructor=true] val args: A.X = R|/args| - [TYPES] [ContainingClassKey=Anno] public? get(): A.X - - } - public final [SUPER_TYPES] class B : R|kotlin/Any| { - public? [SUPER_TYPES] [ContainingClassKey=B] constructor(): R|B| { - super() - } - - @R|Anno|(Q|X|.R|/X.A|) public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { - } - - @Anno(X#.A#) public? final? [SUPER_TYPES] fun foo(): R|kotlin/Unit| { - } - - } - -DeclarationStatus: -FILE: annotationParameters.kt - public? final? [RAW_FIR] enum class X : R|kotlin/Enum| { - private [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { - super|>() - } - - public final static [RAW_FIR] [ContainingClassKey=X] enum entry A: R|X| - public final static [BODY_RESOLVE] [ContainingClassKey=X] fun values(): R|kotlin/Array| { - } - - public final static [BODY_RESOLVE] [ContainingClassKey=X] fun valueOf([BODY_RESOLVE] value: R|kotlin/String|): R|X| { - } - - } - public? final? [RAW_FIR] annotation class Anno : R|kotlin/Annotation| { - public? [RAW_FIR] [ContainingClassKey=Anno] constructor([RAW_FIR] [CorrespondingProperty=/Anno.args] args: A.X): R|Anno| { - super() - } - - public? final? [RAW_FIR] [IsFromPrimaryConstructor=true] val args: A.X = R|/args| - [TYPES] [ContainingClassKey=Anno] public? get(): A.X - - } - public final [SUPER_TYPES] class B : R|kotlin/Any| { - public? [SUPER_TYPES] [ContainingClassKey=B] constructor(): R|B| { - super() - } - - @R|Anno|(X#.A#) public final [STATUS] fun resolveMe(): R|kotlin/Unit| { - } - - @Anno(X#.A#) public? final? [SUPER_TYPES] fun foo(): R|kotlin/Unit| { - } - - } - -ValueParametersTypes: -FILE: annotationParameters.kt - public? final? [RAW_FIR] enum class X : R|kotlin/Enum| { - private [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { - super|>() - } - - public final static [RAW_FIR] [ContainingClassKey=X] enum entry A: R|X| - public final static [BODY_RESOLVE] [ContainingClassKey=X] fun values(): R|kotlin/Array| { - } - - public final static [BODY_RESOLVE] [ContainingClassKey=X] fun valueOf([BODY_RESOLVE] value: R|kotlin/String|): R|X| { - } - - } - public? final? [RAW_FIR] annotation class Anno : R|kotlin/Annotation| { - public? [RAW_FIR] [ContainingClassKey=Anno] constructor([RAW_FIR] [CorrespondingProperty=/Anno.args] args: A.X): R|Anno| { - super() - } - - public? final? [RAW_FIR] [IsFromPrimaryConstructor=true] val args: A.X = R|/args| - [TYPES] [ContainingClassKey=Anno] public? get(): A.X - - } - public? final? [SUPER_TYPES] class B : R|kotlin/Any| { - public? [SUPER_TYPES] [ContainingClassKey=B] constructor(): R|B| { - super() - } - - @R|Anno|(X#.A#) public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - } - - @Anno(X#.A#) public? final? [SUPER_TYPES] fun foo(): R|kotlin/Unit| { - } - - } - -TypeParametersTypes: -FILE: annotationParameters.kt - public? final? [RAW_FIR] enum class X : R|kotlin/Enum| { - private [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { - super|>() - } - - public final static [RAW_FIR] [ContainingClassKey=X] enum entry A: R|X| - public final static [BODY_RESOLVE] [ContainingClassKey=X] fun values(): R|kotlin/Array| { - } - - public final static [BODY_RESOLVE] [ContainingClassKey=X] fun valueOf([BODY_RESOLVE] value: R|kotlin/String|): R|X| { - } - - } - public? final? [RAW_FIR] annotation class Anno : R|kotlin/Annotation| { - public? [RAW_FIR] [ContainingClassKey=Anno] constructor([RAW_FIR] [CorrespondingProperty=/Anno.args] args: A.X): R|Anno| { - super() - } - - public? final? [RAW_FIR] [IsFromPrimaryConstructor=true] val args: A.X = R|/args| - [TYPES] [ContainingClassKey=Anno] public? get(): A.X - - } - public? final? [SUPER_TYPES] class B : R|kotlin/Any| { - public? [SUPER_TYPES] [ContainingClassKey=B] constructor(): R|B| { - super() - } - - @R|Anno|(X#.A#) public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - } - - @Anno(X#.A#) public? final? [SUPER_TYPES] fun foo(): R|kotlin/Unit| { - } + @R|Anno|(X#.A#) public final [STATUS] fun foo(): R|kotlin/Unit| { LAZY_BLOCK } } diff --git a/analysis/low-level-api-fir/testdata/lazyResolve/annotations.txt b/analysis/low-level-api-fir/testdata/lazyResolve/annotations.txt index af3c8e9e111..61fbb8cce40 100644 --- a/analysis/low-level-api-fir/testdata/lazyResolve/annotations.txt +++ b/analysis/low-level-api-fir/testdata/lazyResolve/annotations.txt @@ -1,38 +1,33 @@ + RAW_FIR: FILE: annotations.kt @FILE:Suppress(String(1)) - @Suppress(String(2)) public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - } + @Suppress(String(2)) public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } IMPORTS: FILE: annotations.kt @FILE:Suppress(String(1)) - @Suppress(String(2)) public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - } + @Suppress(String(2)) public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } SUPER_TYPES: FILE: annotations.kt @FILE:Suppress(String(1)) - @Suppress(String(2)) public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { - } + @Suppress(String(2)) public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } TYPES: FILE: annotations.kt @FILE:Suppress(String(1)) - @R|kotlin/Suppress|(String(2)) public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - } + @R|kotlin/Suppress|(String(2)) public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } STATUS: FILE: annotations.kt @FILE:Suppress(String(1)) - @R|kotlin/Suppress|(String(2)) public final [STATUS] fun resolveMe(): R|kotlin/Unit| { - } + @R|kotlin/Suppress|(String(2)) public final [STATUS] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } ARGUMENTS_OF_ANNOTATIONS: FILE: annotations.kt @FILE:Suppress(String(1)) - @R|kotlin/Suppress|(String(2)) public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { - } + @R|kotlin/Suppress|(String(2)) public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } CONTRACTS: FILE: annotations.kt @@ -52,66 +47,6 @@ FILE: annotations.kt @R|kotlin/Suppress|(names = vararg(String(2))) public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { } -NoResolve: -FILE: annotations.kt - @FILE:Suppress(String(1)) - @Suppress(String(2)) public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - } - -BodyResolveWithChildren: -FILE: annotations.kt - @FILE:Suppress(String(1)) - @R|kotlin/Suppress|(names = vararg(String(2))) public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { - } - -CallableBodyResolve: -FILE: annotations.kt - @FILE:Suppress(String(1)) - @R|kotlin/Suppress|(names = vararg(String(2))) public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { - } - -CallableReturnType: -FILE: annotations.kt - @FILE:Suppress(String(1)) - @Suppress(String(2)) public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - } - -AnnotationType: -FILE: annotations.kt - @FILE:Suppress(String(1)) - @R|kotlin/Suppress|(String(2)) public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - } - -AnnotationsArguments: -FILE: annotations.kt - @FILE:Suppress(String(1)) - @R|kotlin/Suppress|(String(2)) public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { - } - -CallableContracts: -FILE: annotations.kt - @FILE:Suppress(String(1)) - @R|kotlin/Suppress|(String(2)) public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { - } - -DeclarationStatus: -FILE: annotations.kt - @FILE:Suppress(String(1)) - @R|kotlin/Suppress|(String(2)) public final [STATUS] fun resolveMe(): R|kotlin/Unit| { - } - -ValueParametersTypes: -FILE: annotations.kt - @FILE:Suppress(String(1)) - @R|kotlin/Suppress|(String(2)) public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - } - -TypeParametersTypes: -FILE: annotations.kt - @FILE:Suppress(String(1)) - @R|kotlin/Suppress|(String(2)) public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - } - FILE RAW TO BODY: FILE: annotations.kt @FILE:R|kotlin/Suppress|(names = vararg(String(1))) diff --git a/analysis/low-level-api-fir/testdata/lazyResolve/classMembers.txt b/analysis/low-level-api-fir/testdata/lazyResolve/classMembers.txt index 3031699dff9..eed3d21b90a 100644 --- a/analysis/low-level-api-fir/testdata/lazyResolve/classMembers.txt +++ b/analysis/low-level-api-fir/testdata/lazyResolve/classMembers.txt @@ -1,3 +1,4 @@ + RAW_FIR: FILE: classMembers.kt public? final? [RAW_FIR] class A : R|kotlin/Any| { @@ -5,21 +6,14 @@ FILE: classMembers.kt super() } - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } + public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } - public? final? [RAW_FIR] val x: Int = IntegerLiteral(10) - [RAW_FIR] [ContainingClassKey=A] public? get(): Int { - ^ field# - } + public? final? [RAW_FIR] val x: Int = LAZY_EXPRESSION + [RAW_FIR] [ContainingClassKey=A] public? get(): Int { LAZY_BLOCK } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } + public? final? [RAW_FIR] fun functionWithLazyBody(): String { LAZY_BLOCK } } @@ -30,21 +24,14 @@ FILE: classMembers.kt super() } - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } + public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } - public? final? [RAW_FIR] val x: Int = IntegerLiteral(10) - [RAW_FIR] [ContainingClassKey=A] public? get(): Int { - ^ field# - } + public? final? [RAW_FIR] val x: Int = LAZY_EXPRESSION + [RAW_FIR] [ContainingClassKey=A] public? get(): Int { LAZY_BLOCK } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } + public? final? [RAW_FIR] fun functionWithLazyBody(): String { LAZY_BLOCK } } @@ -55,21 +42,14 @@ FILE: classMembers.kt super() } - public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } + public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } - public? final? [RAW_FIR] val x: Int = IntegerLiteral(10) - [RAW_FIR] [ContainingClassKey=A] public? get(): Int { - ^ field# - } + public? final? [RAW_FIR] val x: Int = LAZY_EXPRESSION + [RAW_FIR] [ContainingClassKey=A] public? get(): Int { LAZY_BLOCK } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } + public? final? [RAW_FIR] fun functionWithLazyBody(): String { LAZY_BLOCK } } @@ -80,21 +60,14 @@ FILE: classMembers.kt super() } - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } - public? final? [SUPER_TYPES] val x: Int = IntegerLiteral(10) - [SUPER_TYPES] [ContainingClassKey=A] public? get(): Int { - ^ field# - } + public? final? [SUPER_TYPES] val x: Int = LAZY_EXPRESSION + [SUPER_TYPES] [ContainingClassKey=A] public? get(): Int { LAZY_BLOCK } - public? final? [SUPER_TYPES] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } + public? final? [SUPER_TYPES] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } - public? final? [SUPER_TYPES] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } + public? final? [SUPER_TYPES] fun functionWithLazyBody(): String { LAZY_BLOCK } } @@ -105,21 +78,14 @@ FILE: classMembers.kt super() } - public final [STATUS] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } + public final [STATUS] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } - public? final? [SUPER_TYPES] val x: Int = IntegerLiteral(10) - [SUPER_TYPES] [ContainingClassKey=A] public? get(): Int { - ^ field# - } + public? final? [SUPER_TYPES] val x: Int = LAZY_EXPRESSION + [SUPER_TYPES] [ContainingClassKey=A] public? get(): Int { LAZY_BLOCK } - public? final? [SUPER_TYPES] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } + public? final? [SUPER_TYPES] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } - public? final? [SUPER_TYPES] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } + public? final? [SUPER_TYPES] fun functionWithLazyBody(): String { LAZY_BLOCK } } @@ -130,21 +96,14 @@ FILE: classMembers.kt super() } - public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } + public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } - public? final? [SUPER_TYPES] val x: Int = IntegerLiteral(10) - [SUPER_TYPES] [ContainingClassKey=A] public? get(): Int { - ^ field# - } + public? final? [SUPER_TYPES] val x: Int = LAZY_EXPRESSION + [SUPER_TYPES] [ContainingClassKey=A] public? get(): Int { LAZY_BLOCK } - public? final? [SUPER_TYPES] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } + public? final? [SUPER_TYPES] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } - public? final? [SUPER_TYPES] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } + public? final? [SUPER_TYPES] fun functionWithLazyBody(): String { LAZY_BLOCK } } @@ -159,17 +118,12 @@ FILE: classMembers.kt receive#(functionWithLazyBody#()) } - public? final? [SUPER_TYPES] val x: Int = IntegerLiteral(10) - [SUPER_TYPES] [ContainingClassKey=A] public? get(): Int { - ^ field# - } + public? final? [SUPER_TYPES] val x: Int = LAZY_EXPRESSION + [SUPER_TYPES] [ContainingClassKey=A] public? get(): Int { LAZY_BLOCK } - public? final? [SUPER_TYPES] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } + public? final? [SUPER_TYPES] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } - public? final? [SUPER_TYPES] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } + public? final? [SUPER_TYPES] fun functionWithLazyBody(): String { LAZY_BLOCK } } @@ -184,17 +138,12 @@ FILE: classMembers.kt receive#(functionWithLazyBody#()) } - public final [STATUS] val x: R|kotlin/Int| = IntegerLiteral(10) - [STATUS] [ContainingClassKey=A] public get(): R|kotlin/Int| { - ^ field# - } + public final [STATUS] val x: R|kotlin/Int| = LAZY_EXPRESSION + [STATUS] [ContainingClassKey=A] public get(): R|kotlin/Int| { LAZY_BLOCK } - public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { - } + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { LAZY_BLOCK } - public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { - ^functionWithLazyBody String(42) - } + public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { LAZY_BLOCK } } @@ -209,267 +158,12 @@ FILE: classMembers.kt this@R|/A|.R|/A.receive|(this@R|/A|.R|/A.functionWithLazyBody|()) } - public final [STATUS] val x: R|kotlin/Int| = IntegerLiteral(10) - [STATUS] [ContainingClassKey=A] public get(): R|kotlin/Int| { - ^ field# - } + public final [STATUS] val x: R|kotlin/Int| = LAZY_EXPRESSION + [STATUS] [ContainingClassKey=A] public get(): R|kotlin/Int| { LAZY_BLOCK } - public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { - } + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { LAZY_BLOCK } - public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { - ^functionWithLazyBody String(42) - } - - } - -NoResolve: -FILE: classMembers.kt - public? final? [RAW_FIR] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { - super() - } - - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - - public? final? [RAW_FIR] val x: Int = IntegerLiteral(10) - [RAW_FIR] [ContainingClassKey=A] public? get(): Int { - ^ field# - } - - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } - - } - -BodyResolveWithChildren: -FILE: classMembers.kt - public final [STATUS] class A : R|kotlin/Any| { - public [STATUS] [ContainingClassKey=A] constructor(): R|A| { - super() - } - - public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { - this@R|/A|.R|/A.receive|(this@R|/A|.R|/A.functionWithLazyBody|()) - } - - public final [STATUS] val x: R|kotlin/Int| = IntegerLiteral(10) - [STATUS] [ContainingClassKey=A] public get(): R|kotlin/Int| { - ^ field# - } - - public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { - } - - public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { - ^functionWithLazyBody String(42) - } - - } - -CallableBodyResolve: -FILE: classMembers.kt - public final [STATUS] class A : R|kotlin/Any| { - public [STATUS] [ContainingClassKey=A] constructor(): R|A| { - super() - } - - public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { - this@R|/A|.R|/A.receive|(this@R|/A|.R|/A.functionWithLazyBody|()) - } - - public final [STATUS] val x: R|kotlin/Int| = IntegerLiteral(10) - [STATUS] [ContainingClassKey=A] public get(): R|kotlin/Int| { - ^ field# - } - - public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { - } - - public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { - ^functionWithLazyBody String(42) - } - - } - -CallableReturnType: -FILE: classMembers.kt - public? final? [RAW_FIR] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { - super() - } - - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - - public? final? [RAW_FIR] val x: Int = IntegerLiteral(10) - [RAW_FIR] [ContainingClassKey=A] public? get(): Int { - ^ field# - } - - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } - - } - -AnnotationType: -FILE: classMembers.kt - public? final? [SUPER_TYPES] class A : R|kotlin/Any| { - public? [SUPER_TYPES] [ContainingClassKey=A] constructor(): R|A| { - super() - } - - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - - public? final? [SUPER_TYPES] val x: Int = IntegerLiteral(10) - [SUPER_TYPES] [ContainingClassKey=A] public? get(): Int { - ^ field# - } - - public? final? [SUPER_TYPES] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - - public? final? [SUPER_TYPES] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } - - } - -AnnotationsArguments: -FILE: classMembers.kt - public final [SUPER_TYPES] class A : R|kotlin/Any| { - public? [SUPER_TYPES] [ContainingClassKey=A] constructor(): R|A| { - super() - } - - public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - - public? final? [SUPER_TYPES] val x: Int = IntegerLiteral(10) - [SUPER_TYPES] [ContainingClassKey=A] public? get(): Int { - ^ field# - } - - public? final? [SUPER_TYPES] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - - public? final? [SUPER_TYPES] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } - - } - -CallableContracts: -FILE: classMembers.kt - public final [SUPER_TYPES] class A : R|kotlin/Any| { - public? [SUPER_TYPES] [ContainingClassKey=A] constructor(): R|A| { - super() - } - - public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - - public? final? [SUPER_TYPES] val x: Int = IntegerLiteral(10) - [SUPER_TYPES] [ContainingClassKey=A] public? get(): Int { - ^ field# - } - - public? final? [SUPER_TYPES] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - - public? final? [SUPER_TYPES] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } - - } - -DeclarationStatus: -FILE: classMembers.kt - public final [SUPER_TYPES] class A : R|kotlin/Any| { - public? [SUPER_TYPES] [ContainingClassKey=A] constructor(): R|A| { - super() - } - - public final [STATUS] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - - public? final? [SUPER_TYPES] val x: Int = IntegerLiteral(10) - [SUPER_TYPES] [ContainingClassKey=A] public? get(): Int { - ^ field# - } - - public? final? [SUPER_TYPES] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - - public? final? [SUPER_TYPES] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } - - } - -ValueParametersTypes: -FILE: classMembers.kt - public? final? [SUPER_TYPES] class A : R|kotlin/Any| { - public? [SUPER_TYPES] [ContainingClassKey=A] constructor(): R|A| { - super() - } - - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - - public? final? [SUPER_TYPES] val x: Int = IntegerLiteral(10) - [SUPER_TYPES] [ContainingClassKey=A] public? get(): Int { - ^ field# - } - - public? final? [SUPER_TYPES] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - - public? final? [SUPER_TYPES] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } - - } - -TypeParametersTypes: -FILE: classMembers.kt - public? final? [SUPER_TYPES] class A : R|kotlin/Any| { - public? [SUPER_TYPES] [ContainingClassKey=A] constructor(): R|A| { - super() - } - - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - - public? final? [SUPER_TYPES] val x: Int = IntegerLiteral(10) - [SUPER_TYPES] [ContainingClassKey=A] public? get(): Int { - ^ field# - } - - public? final? [SUPER_TYPES] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - - public? final? [SUPER_TYPES] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } + public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { LAZY_BLOCK } } diff --git a/analysis/low-level-api-fir/testdata/lazyResolve/delegates.txt b/analysis/low-level-api-fir/testdata/lazyResolve/delegates.txt index 2746b40f6ca..df889ba64c7 100644 --- a/analysis/low-level-api-fir/testdata/lazyResolve/delegates.txt +++ b/analysis/low-level-api-fir/testdata/lazyResolve/delegates.txt @@ -1,44 +1,26 @@ + RAW_FIR: FILE: delegates.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(valueWithExplicitType#) - receive#(valueWithImplicitType#) - variableWithExplicitType# = IntegerLiteral(10) - variableWithImplicitType# = IntegerLiteral(10) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] val delegate: = object : ReadWriteProperty { - private [RAW_FIR] [ContainingClassKey=] constructor(): R|| { - super<>() - } - - public? open? override [RAW_FIR] fun getValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>): Int { - ^getValue IntegerLiteral(1) - } - - public? open? override [RAW_FIR] fun setValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>, [RAW_FIR] value: Int): R|kotlin/Unit| { - } - - } - + public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] val delegate: = LAZY_EXPRESSION [TYPES] public? get(): - public? final? [RAW_FIR] val valueWithExplicitType: Intby delegate# + public? final? [RAW_FIR] val valueWithExplicitType: Intby LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/valueWithExplicitType|.getValue#(Null(null), ::R|/valueWithExplicitType|) } - public? final? [RAW_FIR] val valueWithImplicitType: by delegate# + public? final? [RAW_FIR] val valueWithImplicitType: by LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/valueWithImplicitType|.getValue#(Null(null), ::R|/valueWithImplicitType|) } - public? final? [RAW_FIR] var variableWithExplicitType: Intby delegate# + public? final? [RAW_FIR] var variableWithExplicitType: Intby LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/variableWithExplicitType|.getValue#(Null(null), ::R|/variableWithExplicitType|) } [RAW_FIR] public? set([RAW_FIR] : ): R|kotlin/Unit| { D|/variableWithExplicitType|.setValue#(Null(null), ::R|/variableWithExplicitType|, R|/variableWithExplicitType|) } - public? final? [RAW_FIR] var variableWithImplicitType: by delegate# + public? final? [RAW_FIR] var variableWithImplicitType: by LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/variableWithImplicitType|.getValue#(Null(null), ::R|/variableWithImplicitType|) } @@ -48,45 +30,26 @@ FILE: delegates.kt IMPORTS: FILE: delegates.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(valueWithExplicitType#) - receive#(valueWithImplicitType#) - variableWithExplicitType# = IntegerLiteral(10) - variableWithImplicitType# = IntegerLiteral(10) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] val delegate: = object : ReadWriteProperty { - private [RAW_FIR] [ContainingClassKey=] constructor(): R|| { - super<>() - } - - public? open? override [RAW_FIR] fun getValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>): Int { - ^getValue IntegerLiteral(1) - } - - public? open? override [RAW_FIR] fun setValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>, [RAW_FIR] value: Int): R|kotlin/Unit| { - } - - } - + public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] val delegate: = LAZY_EXPRESSION [TYPES] public? get(): - public? final? [RAW_FIR] val valueWithExplicitType: Intby delegate# + public? final? [RAW_FIR] val valueWithExplicitType: Intby LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/valueWithExplicitType|.getValue#(Null(null), ::R|/valueWithExplicitType|) } - public? final? [RAW_FIR] val valueWithImplicitType: by delegate# + public? final? [RAW_FIR] val valueWithImplicitType: by LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/valueWithImplicitType|.getValue#(Null(null), ::R|/valueWithImplicitType|) } - public? final? [RAW_FIR] var variableWithExplicitType: Intby delegate# + public? final? [RAW_FIR] var variableWithExplicitType: Intby LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/variableWithExplicitType|.getValue#(Null(null), ::R|/variableWithExplicitType|) } [RAW_FIR] public? set([RAW_FIR] : ): R|kotlin/Unit| { D|/variableWithExplicitType|.setValue#(Null(null), ::R|/variableWithExplicitType|, R|/variableWithExplicitType|) } - public? final? [RAW_FIR] var variableWithImplicitType: by delegate# + public? final? [RAW_FIR] var variableWithImplicitType: by LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/variableWithImplicitType|.getValue#(Null(null), ::R|/variableWithImplicitType|) } @@ -96,45 +59,26 @@ FILE: delegates.kt SUPER_TYPES: FILE: delegates.kt - public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(valueWithExplicitType#) - receive#(valueWithImplicitType#) - variableWithExplicitType# = IntegerLiteral(10) - variableWithImplicitType# = IntegerLiteral(10) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] val delegate: = object : ReadWriteProperty { - private [RAW_FIR] [ContainingClassKey=] constructor(): R|| { - super<>() - } - - public? open? override [RAW_FIR] fun getValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>): Int { - ^getValue IntegerLiteral(1) - } - - public? open? override [RAW_FIR] fun setValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>, [RAW_FIR] value: Int): R|kotlin/Unit| { - } - - } - + public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] val delegate: = LAZY_EXPRESSION [TYPES] public? get(): - public? final? [RAW_FIR] val valueWithExplicitType: Intby delegate# + public? final? [RAW_FIR] val valueWithExplicitType: Intby LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/valueWithExplicitType|.getValue#(Null(null), ::R|/valueWithExplicitType|) } - public? final? [RAW_FIR] val valueWithImplicitType: by delegate# + public? final? [RAW_FIR] val valueWithImplicitType: by LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/valueWithImplicitType|.getValue#(Null(null), ::R|/valueWithImplicitType|) } - public? final? [RAW_FIR] var variableWithExplicitType: Intby delegate# + public? final? [RAW_FIR] var variableWithExplicitType: Intby LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/variableWithExplicitType|.getValue#(Null(null), ::R|/variableWithExplicitType|) } [RAW_FIR] public? set([RAW_FIR] : ): R|kotlin/Unit| { D|/variableWithExplicitType|.setValue#(Null(null), ::R|/variableWithExplicitType|, R|/variableWithExplicitType|) } - public? final? [RAW_FIR] var variableWithImplicitType: by delegate# + public? final? [RAW_FIR] var variableWithImplicitType: by LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/variableWithImplicitType|.getValue#(Null(null), ::R|/variableWithImplicitType|) } @@ -144,45 +88,26 @@ FILE: delegates.kt TYPES: FILE: delegates.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(valueWithExplicitType#) - receive#(valueWithImplicitType#) - variableWithExplicitType# = IntegerLiteral(10) - variableWithImplicitType# = IntegerLiteral(10) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] val delegate: = object : ReadWriteProperty { - private [RAW_FIR] [ContainingClassKey=] constructor(): R|| { - super<>() - } - - public? open? override [RAW_FIR] fun getValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>): Int { - ^getValue IntegerLiteral(1) - } - - public? open? override [RAW_FIR] fun setValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>, [RAW_FIR] value: Int): R|kotlin/Unit| { - } - - } - + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] val delegate: = LAZY_EXPRESSION [TYPES] public? get(): - public? final? [RAW_FIR] val valueWithExplicitType: Intby delegate# + public? final? [RAW_FIR] val valueWithExplicitType: Intby LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/valueWithExplicitType|.getValue#(Null(null), ::R|/valueWithExplicitType|) } - public? final? [RAW_FIR] val valueWithImplicitType: by delegate# + public? final? [RAW_FIR] val valueWithImplicitType: by LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/valueWithImplicitType|.getValue#(Null(null), ::R|/valueWithImplicitType|) } - public? final? [RAW_FIR] var variableWithExplicitType: Intby delegate# + public? final? [RAW_FIR] var variableWithExplicitType: Intby LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/variableWithExplicitType|.getValue#(Null(null), ::R|/variableWithExplicitType|) } [RAW_FIR] public? set([RAW_FIR] : ): R|kotlin/Unit| { D|/variableWithExplicitType|.setValue#(Null(null), ::R|/variableWithExplicitType|, R|/variableWithExplicitType|) } - public? final? [RAW_FIR] var variableWithImplicitType: by delegate# + public? final? [RAW_FIR] var variableWithImplicitType: by LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/variableWithImplicitType|.getValue#(Null(null), ::R|/variableWithImplicitType|) } @@ -192,45 +117,26 @@ FILE: delegates.kt STATUS: FILE: delegates.kt - public final [STATUS] fun resolveMe(): R|kotlin/Unit| { - receive#(valueWithExplicitType#) - receive#(valueWithImplicitType#) - variableWithExplicitType# = IntegerLiteral(10) - variableWithImplicitType# = IntegerLiteral(10) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] val delegate: = object : ReadWriteProperty { - private [RAW_FIR] [ContainingClassKey=] constructor(): R|| { - super<>() - } - - public? open? override [RAW_FIR] fun getValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>): Int { - ^getValue IntegerLiteral(1) - } - - public? open? override [RAW_FIR] fun setValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>, [RAW_FIR] value: Int): R|kotlin/Unit| { - } - - } - + public final [STATUS] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] val delegate: = LAZY_EXPRESSION [TYPES] public? get(): - public? final? [RAW_FIR] val valueWithExplicitType: Intby delegate# + public? final? [RAW_FIR] val valueWithExplicitType: Intby LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/valueWithExplicitType|.getValue#(Null(null), ::R|/valueWithExplicitType|) } - public? final? [RAW_FIR] val valueWithImplicitType: by delegate# + public? final? [RAW_FIR] val valueWithImplicitType: by LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/valueWithImplicitType|.getValue#(Null(null), ::R|/valueWithImplicitType|) } - public? final? [RAW_FIR] var variableWithExplicitType: Intby delegate# + public? final? [RAW_FIR] var variableWithExplicitType: Intby LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/variableWithExplicitType|.getValue#(Null(null), ::R|/variableWithExplicitType|) } [RAW_FIR] public? set([RAW_FIR] : ): R|kotlin/Unit| { D|/variableWithExplicitType|.setValue#(Null(null), ::R|/variableWithExplicitType|, R|/variableWithExplicitType|) } - public? final? [RAW_FIR] var variableWithImplicitType: by delegate# + public? final? [RAW_FIR] var variableWithImplicitType: by LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/variableWithImplicitType|.getValue#(Null(null), ::R|/variableWithImplicitType|) } @@ -240,45 +146,26 @@ FILE: delegates.kt ARGUMENTS_OF_ANNOTATIONS: FILE: delegates.kt - public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { - receive#(valueWithExplicitType#) - receive#(valueWithImplicitType#) - variableWithExplicitType# = IntegerLiteral(10) - variableWithImplicitType# = IntegerLiteral(10) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] val delegate: = object : ReadWriteProperty { - private [RAW_FIR] [ContainingClassKey=] constructor(): R|| { - super<>() - } - - public? open? override [RAW_FIR] fun getValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>): Int { - ^getValue IntegerLiteral(1) - } - - public? open? override [RAW_FIR] fun setValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>, [RAW_FIR] value: Int): R|kotlin/Unit| { - } - - } - + public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] val delegate: = LAZY_EXPRESSION [TYPES] public? get(): - public? final? [RAW_FIR] val valueWithExplicitType: Intby delegate# + public? final? [RAW_FIR] val valueWithExplicitType: Intby LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/valueWithExplicitType|.getValue#(Null(null), ::R|/valueWithExplicitType|) } - public? final? [RAW_FIR] val valueWithImplicitType: by delegate# + public? final? [RAW_FIR] val valueWithImplicitType: by LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/valueWithImplicitType|.getValue#(Null(null), ::R|/valueWithImplicitType|) } - public? final? [RAW_FIR] var variableWithExplicitType: Intby delegate# + public? final? [RAW_FIR] var variableWithExplicitType: Intby LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/variableWithExplicitType|.getValue#(Null(null), ::R|/variableWithExplicitType|) } [RAW_FIR] public? set([RAW_FIR] : ): R|kotlin/Unit| { D|/variableWithExplicitType|.setValue#(Null(null), ::R|/variableWithExplicitType|, R|/variableWithExplicitType|) } - public? final? [RAW_FIR] var variableWithImplicitType: by delegate# + public? final? [RAW_FIR] var variableWithImplicitType: by LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/variableWithImplicitType|.getValue#(Null(null), ::R|/variableWithImplicitType|) } @@ -294,39 +181,25 @@ FILE: delegates.kt variableWithExplicitType# = IntegerLiteral(10) variableWithImplicitType# = IntegerLiteral(10) } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] val delegate: = object : ReadWriteProperty { - private [RAW_FIR] [ContainingClassKey=] constructor(): R|| { - super<>() - } - - public? open? override [RAW_FIR] fun getValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>): Int { - ^getValue IntegerLiteral(1) - } - - public? open? override [RAW_FIR] fun setValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>, [RAW_FIR] value: Int): R|kotlin/Unit| { - } - - } - + public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] val delegate: = LAZY_EXPRESSION [TYPES] public? get(): - public? final? [RAW_FIR] val valueWithExplicitType: Intby delegate# + public? final? [RAW_FIR] val valueWithExplicitType: Intby LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/valueWithExplicitType|.getValue#(Null(null), ::R|/valueWithExplicitType|) } - public? final? [RAW_FIR] val valueWithImplicitType: by delegate# + public? final? [RAW_FIR] val valueWithImplicitType: by LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/valueWithImplicitType|.getValue#(Null(null), ::R|/valueWithImplicitType|) } - public? final? [RAW_FIR] var variableWithExplicitType: Intby delegate# + public? final? [RAW_FIR] var variableWithExplicitType: Intby LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/variableWithExplicitType|.getValue#(Null(null), ::R|/variableWithExplicitType|) } [RAW_FIR] public? set([RAW_FIR] : ): R|kotlin/Unit| { D|/variableWithExplicitType|.setValue#(Null(null), ::R|/variableWithExplicitType|, R|/variableWithExplicitType|) } - public? final? [RAW_FIR] var variableWithImplicitType: by delegate# + public? final? [RAW_FIR] var variableWithImplicitType: by LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/variableWithImplicitType|.getValue#(Null(null), ::R|/variableWithImplicitType|) } @@ -342,39 +215,25 @@ FILE: delegates.kt variableWithExplicitType# = IntegerLiteral(10) variableWithImplicitType# = IntegerLiteral(10) } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] val delegate: = object : ReadWriteProperty { - private [RAW_FIR] [ContainingClassKey=] constructor(): R|| { - super<>() - } - - public? open? override [RAW_FIR] fun getValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>): Int { - ^getValue IntegerLiteral(1) - } - - public? open? override [RAW_FIR] fun setValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>, [RAW_FIR] value: Int): R|kotlin/Unit| { - } - - } - + public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] val delegate: = LAZY_EXPRESSION [TYPES] public? get(): - public? final? [RAW_FIR] val valueWithExplicitType: Intby delegate# + public? final? [RAW_FIR] val valueWithExplicitType: Intby LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/valueWithExplicitType|.getValue#(Null(null), ::R|/valueWithExplicitType|) } - public? final? [RAW_FIR] val valueWithImplicitType: by delegate# + public? final? [RAW_FIR] val valueWithImplicitType: by LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/valueWithImplicitType|.getValue#(Null(null), ::R|/valueWithImplicitType|) } - public? final? [RAW_FIR] var variableWithExplicitType: Intby delegate# + public? final? [RAW_FIR] var variableWithExplicitType: Intby LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/variableWithExplicitType|.getValue#(Null(null), ::R|/variableWithExplicitType|) } [RAW_FIR] public? set([RAW_FIR] : ): R|kotlin/Unit| { D|/variableWithExplicitType|.setValue#(Null(null), ::R|/variableWithExplicitType|, R|/variableWithExplicitType|) } - public? final? [RAW_FIR] var variableWithImplicitType: by delegate# + public? final? [RAW_FIR] var variableWithImplicitType: by LAZY_EXPRESSION [RAW_FIR] public? get(): { ^ D|/variableWithImplicitType|.getValue#(Null(null), ::R|/variableWithImplicitType|) } @@ -390,8 +249,7 @@ FILE: delegates.kt R|/variableWithExplicitType| = Int(10) R|/variableWithImplicitType| = Int(10) } - public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { - } + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { LAZY_BLOCK } public final [STATUS] val delegate: R|kotlin/properties/ReadWriteProperty| = object : R|kotlin/properties/ReadWriteProperty| { private [RAW_FIR] [ContainingClassKey=] constructor(): R|| { super() @@ -407,7 +265,7 @@ FILE: delegates.kt } [BODY_RESOLVE] public get(): R|kotlin/properties/ReadWriteProperty| - public final [STATUS] val valueWithExplicitType: R|kotlin/Int|by delegate# + public final [STATUS] val valueWithExplicitType: R|kotlin/Int|by LAZY_EXPRESSION [STATUS] public get(): { ^ D|/valueWithExplicitType|.getValue#(Null(null), ::R|/valueWithExplicitType|) } @@ -415,7 +273,7 @@ FILE: delegates.kt [IMPLICIT_TYPES_BODY_RESOLVE] public get(): R|kotlin/Int| { ^ D|/valueWithImplicitType|.R|SubstitutionOverride|(Null(null), ::R|/valueWithImplicitType|) } - public final [STATUS] var variableWithExplicitType: R|kotlin/Int|by delegate# + public final [STATUS] var variableWithExplicitType: R|kotlin/Int|by LAZY_EXPRESSION [STATUS] public get(): { ^ D|/variableWithExplicitType|.getValue#(Null(null), ::R|/variableWithExplicitType|) } @@ -430,486 +288,6 @@ FILE: delegates.kt D|/variableWithImplicitType|.R|SubstitutionOverride|(Null(null), ::R|/variableWithImplicitType|, R|/variableWithImplicitType|) } -NoResolve: -FILE: delegates.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(valueWithExplicitType#) - receive#(valueWithImplicitType#) - variableWithExplicitType# = IntegerLiteral(10) - variableWithImplicitType# = IntegerLiteral(10) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] val delegate: = object : ReadWriteProperty { - private [RAW_FIR] [ContainingClassKey=] constructor(): R|| { - super<>() - } - - public? open? override [RAW_FIR] fun getValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>): Int { - ^getValue IntegerLiteral(1) - } - - public? open? override [RAW_FIR] fun setValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>, [RAW_FIR] value: Int): R|kotlin/Unit| { - } - - } - - [TYPES] public? get(): - public? final? [RAW_FIR] val valueWithExplicitType: Intby delegate# - [RAW_FIR] public? get(): { - ^ D|/valueWithExplicitType|.getValue#(Null(null), ::R|/valueWithExplicitType|) - } - public? final? [RAW_FIR] val valueWithImplicitType: by delegate# - [RAW_FIR] public? get(): { - ^ D|/valueWithImplicitType|.getValue#(Null(null), ::R|/valueWithImplicitType|) - } - public? final? [RAW_FIR] var variableWithExplicitType: Intby delegate# - [RAW_FIR] public? get(): { - ^ D|/variableWithExplicitType|.getValue#(Null(null), ::R|/variableWithExplicitType|) - } - [RAW_FIR] public? set([RAW_FIR] : ): R|kotlin/Unit| { - D|/variableWithExplicitType|.setValue#(Null(null), ::R|/variableWithExplicitType|, R|/variableWithExplicitType|) - } - public? final? [RAW_FIR] var variableWithImplicitType: by delegate# - [RAW_FIR] public? get(): { - ^ D|/variableWithImplicitType|.getValue#(Null(null), ::R|/variableWithImplicitType|) - } - [RAW_FIR] public? set([RAW_FIR] : ): R|kotlin/Unit| { - D|/variableWithImplicitType|.setValue#(Null(null), ::R|/variableWithImplicitType|, R|/variableWithImplicitType|) - } - -BodyResolveWithChildren: -FILE: delegates.kt - public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { - R|/receive|(R|/valueWithExplicitType|) - R|/receive|(R|/valueWithImplicitType|) - R|/variableWithExplicitType| = Int(10) - R|/variableWithImplicitType| = Int(10) - } - public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { - } - public final [STATUS] val delegate: R|kotlin/properties/ReadWriteProperty| = object : R|kotlin/properties/ReadWriteProperty| { - private [RAW_FIR] [ContainingClassKey=] constructor(): R|| { - super() - } - - public final override operator [RAW_FIR] fun getValue([RAW_FIR] thisRef: R|kotlin/Any?|, [RAW_FIR] property: R|kotlin/reflect/KProperty<*>|): R|kotlin/Int| { - ^getValue Int(1) - } - - public final override operator [RAW_FIR] fun setValue([RAW_FIR] thisRef: R|kotlin/Any?|, [RAW_FIR] property: R|kotlin/reflect/KProperty<*>|, [RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { - } - - } - - [BODY_RESOLVE] public get(): R|kotlin/properties/ReadWriteProperty| - public final [STATUS] val valueWithExplicitType: R|kotlin/Int|by delegate# - [STATUS] public get(): { - ^ D|/valueWithExplicitType|.getValue#(Null(null), ::R|/valueWithExplicitType|) - } - public final [IMPLICIT_TYPES_BODY_RESOLVE] val valueWithImplicitType: R|kotlin/Int|by R|/delegate| - [IMPLICIT_TYPES_BODY_RESOLVE] public get(): R|kotlin/Int| { - ^ D|/valueWithImplicitType|.R|SubstitutionOverride|(Null(null), ::R|/valueWithImplicitType|) - } - public final [STATUS] var variableWithExplicitType: R|kotlin/Int|by delegate# - [STATUS] public get(): { - ^ D|/variableWithExplicitType|.getValue#(Null(null), ::R|/variableWithExplicitType|) - } - [STATUS] public set([RAW_FIR] : ): R|kotlin/Unit| { - D|/variableWithExplicitType|.setValue#(Null(null), ::R|/variableWithExplicitType|, R|/variableWithExplicitType|) - } - public final [IMPLICIT_TYPES_BODY_RESOLVE] var variableWithImplicitType: R|kotlin/Int|by R|/delegate| - [IMPLICIT_TYPES_BODY_RESOLVE] public get(): R|kotlin/Int| { - ^ D|/variableWithImplicitType|.R|SubstitutionOverride|(Null(null), ::R|/variableWithImplicitType|) - } - [IMPLICIT_TYPES_BODY_RESOLVE] public set([RAW_FIR] : R|kotlin/Int|): R|kotlin/Unit| { - D|/variableWithImplicitType|.R|SubstitutionOverride|(Null(null), ::R|/variableWithImplicitType|, R|/variableWithImplicitType|) - } - -CallableBodyResolve: -FILE: delegates.kt - public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { - R|/receive|(R|/valueWithExplicitType|) - R|/receive|(R|/valueWithImplicitType|) - R|/variableWithExplicitType| = Int(10) - R|/variableWithImplicitType| = Int(10) - } - public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { - } - public final [STATUS] val delegate: R|kotlin/properties/ReadWriteProperty| = object : R|kotlin/properties/ReadWriteProperty| { - private [RAW_FIR] [ContainingClassKey=] constructor(): R|| { - super() - } - - public final override operator [RAW_FIR] fun getValue([RAW_FIR] thisRef: R|kotlin/Any?|, [RAW_FIR] property: R|kotlin/reflect/KProperty<*>|): R|kotlin/Int| { - ^getValue Int(1) - } - - public final override operator [RAW_FIR] fun setValue([RAW_FIR] thisRef: R|kotlin/Any?|, [RAW_FIR] property: R|kotlin/reflect/KProperty<*>|, [RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { - } - - } - - [BODY_RESOLVE] public get(): R|kotlin/properties/ReadWriteProperty| - public final [STATUS] val valueWithExplicitType: R|kotlin/Int|by delegate# - [STATUS] public get(): { - ^ D|/valueWithExplicitType|.getValue#(Null(null), ::R|/valueWithExplicitType|) - } - public final [IMPLICIT_TYPES_BODY_RESOLVE] val valueWithImplicitType: R|kotlin/Int|by R|/delegate| - [IMPLICIT_TYPES_BODY_RESOLVE] public get(): R|kotlin/Int| { - ^ D|/valueWithImplicitType|.R|SubstitutionOverride|(Null(null), ::R|/valueWithImplicitType|) - } - public final [STATUS] var variableWithExplicitType: R|kotlin/Int|by delegate# - [STATUS] public get(): { - ^ D|/variableWithExplicitType|.getValue#(Null(null), ::R|/variableWithExplicitType|) - } - [STATUS] public set([RAW_FIR] : ): R|kotlin/Unit| { - D|/variableWithExplicitType|.setValue#(Null(null), ::R|/variableWithExplicitType|, R|/variableWithExplicitType|) - } - public final [IMPLICIT_TYPES_BODY_RESOLVE] var variableWithImplicitType: R|kotlin/Int|by R|/delegate| - [IMPLICIT_TYPES_BODY_RESOLVE] public get(): R|kotlin/Int| { - ^ D|/variableWithImplicitType|.R|SubstitutionOverride|(Null(null), ::R|/variableWithImplicitType|) - } - [IMPLICIT_TYPES_BODY_RESOLVE] public set([RAW_FIR] : R|kotlin/Int|): R|kotlin/Unit| { - D|/variableWithImplicitType|.R|SubstitutionOverride|(Null(null), ::R|/variableWithImplicitType|, R|/variableWithImplicitType|) - } - -CallableReturnType: -FILE: delegates.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(valueWithExplicitType#) - receive#(valueWithImplicitType#) - variableWithExplicitType# = IntegerLiteral(10) - variableWithImplicitType# = IntegerLiteral(10) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] val delegate: = object : ReadWriteProperty { - private [RAW_FIR] [ContainingClassKey=] constructor(): R|| { - super<>() - } - - public? open? override [RAW_FIR] fun getValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>): Int { - ^getValue IntegerLiteral(1) - } - - public? open? override [RAW_FIR] fun setValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>, [RAW_FIR] value: Int): R|kotlin/Unit| { - } - - } - - [TYPES] public? get(): - public? final? [RAW_FIR] val valueWithExplicitType: Intby delegate# - [RAW_FIR] public? get(): { - ^ D|/valueWithExplicitType|.getValue#(Null(null), ::R|/valueWithExplicitType|) - } - public? final? [RAW_FIR] val valueWithImplicitType: by delegate# - [RAW_FIR] public? get(): { - ^ D|/valueWithImplicitType|.getValue#(Null(null), ::R|/valueWithImplicitType|) - } - public? final? [RAW_FIR] var variableWithExplicitType: Intby delegate# - [RAW_FIR] public? get(): { - ^ D|/variableWithExplicitType|.getValue#(Null(null), ::R|/variableWithExplicitType|) - } - [RAW_FIR] public? set([RAW_FIR] : ): R|kotlin/Unit| { - D|/variableWithExplicitType|.setValue#(Null(null), ::R|/variableWithExplicitType|, R|/variableWithExplicitType|) - } - public? final? [RAW_FIR] var variableWithImplicitType: by delegate# - [RAW_FIR] public? get(): { - ^ D|/variableWithImplicitType|.getValue#(Null(null), ::R|/variableWithImplicitType|) - } - [RAW_FIR] public? set([RAW_FIR] : ): R|kotlin/Unit| { - D|/variableWithImplicitType|.setValue#(Null(null), ::R|/variableWithImplicitType|, R|/variableWithImplicitType|) - } - -AnnotationType: -FILE: delegates.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(valueWithExplicitType#) - receive#(valueWithImplicitType#) - variableWithExplicitType# = IntegerLiteral(10) - variableWithImplicitType# = IntegerLiteral(10) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] val delegate: = object : ReadWriteProperty { - private [RAW_FIR] [ContainingClassKey=] constructor(): R|| { - super<>() - } - - public? open? override [RAW_FIR] fun getValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>): Int { - ^getValue IntegerLiteral(1) - } - - public? open? override [RAW_FIR] fun setValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>, [RAW_FIR] value: Int): R|kotlin/Unit| { - } - - } - - [TYPES] public? get(): - public? final? [RAW_FIR] val valueWithExplicitType: Intby delegate# - [RAW_FIR] public? get(): { - ^ D|/valueWithExplicitType|.getValue#(Null(null), ::R|/valueWithExplicitType|) - } - public? final? [RAW_FIR] val valueWithImplicitType: by delegate# - [RAW_FIR] public? get(): { - ^ D|/valueWithImplicitType|.getValue#(Null(null), ::R|/valueWithImplicitType|) - } - public? final? [RAW_FIR] var variableWithExplicitType: Intby delegate# - [RAW_FIR] public? get(): { - ^ D|/variableWithExplicitType|.getValue#(Null(null), ::R|/variableWithExplicitType|) - } - [RAW_FIR] public? set([RAW_FIR] : ): R|kotlin/Unit| { - D|/variableWithExplicitType|.setValue#(Null(null), ::R|/variableWithExplicitType|, R|/variableWithExplicitType|) - } - public? final? [RAW_FIR] var variableWithImplicitType: by delegate# - [RAW_FIR] public? get(): { - ^ D|/variableWithImplicitType|.getValue#(Null(null), ::R|/variableWithImplicitType|) - } - [RAW_FIR] public? set([RAW_FIR] : ): R|kotlin/Unit| { - D|/variableWithImplicitType|.setValue#(Null(null), ::R|/variableWithImplicitType|, R|/variableWithImplicitType|) - } - -AnnotationsArguments: -FILE: delegates.kt - public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { - receive#(valueWithExplicitType#) - receive#(valueWithImplicitType#) - variableWithExplicitType# = IntegerLiteral(10) - variableWithImplicitType# = IntegerLiteral(10) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] val delegate: = object : ReadWriteProperty { - private [RAW_FIR] [ContainingClassKey=] constructor(): R|| { - super<>() - } - - public? open? override [RAW_FIR] fun getValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>): Int { - ^getValue IntegerLiteral(1) - } - - public? open? override [RAW_FIR] fun setValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>, [RAW_FIR] value: Int): R|kotlin/Unit| { - } - - } - - [TYPES] public? get(): - public? final? [RAW_FIR] val valueWithExplicitType: Intby delegate# - [RAW_FIR] public? get(): { - ^ D|/valueWithExplicitType|.getValue#(Null(null), ::R|/valueWithExplicitType|) - } - public? final? [RAW_FIR] val valueWithImplicitType: by delegate# - [RAW_FIR] public? get(): { - ^ D|/valueWithImplicitType|.getValue#(Null(null), ::R|/valueWithImplicitType|) - } - public? final? [RAW_FIR] var variableWithExplicitType: Intby delegate# - [RAW_FIR] public? get(): { - ^ D|/variableWithExplicitType|.getValue#(Null(null), ::R|/variableWithExplicitType|) - } - [RAW_FIR] public? set([RAW_FIR] : ): R|kotlin/Unit| { - D|/variableWithExplicitType|.setValue#(Null(null), ::R|/variableWithExplicitType|, R|/variableWithExplicitType|) - } - public? final? [RAW_FIR] var variableWithImplicitType: by delegate# - [RAW_FIR] public? get(): { - ^ D|/variableWithImplicitType|.getValue#(Null(null), ::R|/variableWithImplicitType|) - } - [RAW_FIR] public? set([RAW_FIR] : ): R|kotlin/Unit| { - D|/variableWithImplicitType|.setValue#(Null(null), ::R|/variableWithImplicitType|, R|/variableWithImplicitType|) - } - -CallableContracts: -FILE: delegates.kt - public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { - receive#(valueWithExplicitType#) - receive#(valueWithImplicitType#) - variableWithExplicitType# = IntegerLiteral(10) - variableWithImplicitType# = IntegerLiteral(10) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] val delegate: = object : ReadWriteProperty { - private [RAW_FIR] [ContainingClassKey=] constructor(): R|| { - super<>() - } - - public? open? override [RAW_FIR] fun getValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>): Int { - ^getValue IntegerLiteral(1) - } - - public? open? override [RAW_FIR] fun setValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>, [RAW_FIR] value: Int): R|kotlin/Unit| { - } - - } - - [TYPES] public? get(): - public? final? [RAW_FIR] val valueWithExplicitType: Intby delegate# - [RAW_FIR] public? get(): { - ^ D|/valueWithExplicitType|.getValue#(Null(null), ::R|/valueWithExplicitType|) - } - public? final? [RAW_FIR] val valueWithImplicitType: by delegate# - [RAW_FIR] public? get(): { - ^ D|/valueWithImplicitType|.getValue#(Null(null), ::R|/valueWithImplicitType|) - } - public? final? [RAW_FIR] var variableWithExplicitType: Intby delegate# - [RAW_FIR] public? get(): { - ^ D|/variableWithExplicitType|.getValue#(Null(null), ::R|/variableWithExplicitType|) - } - [RAW_FIR] public? set([RAW_FIR] : ): R|kotlin/Unit| { - D|/variableWithExplicitType|.setValue#(Null(null), ::R|/variableWithExplicitType|, R|/variableWithExplicitType|) - } - public? final? [RAW_FIR] var variableWithImplicitType: by delegate# - [RAW_FIR] public? get(): { - ^ D|/variableWithImplicitType|.getValue#(Null(null), ::R|/variableWithImplicitType|) - } - [RAW_FIR] public? set([RAW_FIR] : ): R|kotlin/Unit| { - D|/variableWithImplicitType|.setValue#(Null(null), ::R|/variableWithImplicitType|, R|/variableWithImplicitType|) - } - -DeclarationStatus: -FILE: delegates.kt - public final [STATUS] fun resolveMe(): R|kotlin/Unit| { - receive#(valueWithExplicitType#) - receive#(valueWithImplicitType#) - variableWithExplicitType# = IntegerLiteral(10) - variableWithImplicitType# = IntegerLiteral(10) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] val delegate: = object : ReadWriteProperty { - private [RAW_FIR] [ContainingClassKey=] constructor(): R|| { - super<>() - } - - public? open? override [RAW_FIR] fun getValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>): Int { - ^getValue IntegerLiteral(1) - } - - public? open? override [RAW_FIR] fun setValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>, [RAW_FIR] value: Int): R|kotlin/Unit| { - } - - } - - [TYPES] public? get(): - public? final? [RAW_FIR] val valueWithExplicitType: Intby delegate# - [RAW_FIR] public? get(): { - ^ D|/valueWithExplicitType|.getValue#(Null(null), ::R|/valueWithExplicitType|) - } - public? final? [RAW_FIR] val valueWithImplicitType: by delegate# - [RAW_FIR] public? get(): { - ^ D|/valueWithImplicitType|.getValue#(Null(null), ::R|/valueWithImplicitType|) - } - public? final? [RAW_FIR] var variableWithExplicitType: Intby delegate# - [RAW_FIR] public? get(): { - ^ D|/variableWithExplicitType|.getValue#(Null(null), ::R|/variableWithExplicitType|) - } - [RAW_FIR] public? set([RAW_FIR] : ): R|kotlin/Unit| { - D|/variableWithExplicitType|.setValue#(Null(null), ::R|/variableWithExplicitType|, R|/variableWithExplicitType|) - } - public? final? [RAW_FIR] var variableWithImplicitType: by delegate# - [RAW_FIR] public? get(): { - ^ D|/variableWithImplicitType|.getValue#(Null(null), ::R|/variableWithImplicitType|) - } - [RAW_FIR] public? set([RAW_FIR] : ): R|kotlin/Unit| { - D|/variableWithImplicitType|.setValue#(Null(null), ::R|/variableWithImplicitType|, R|/variableWithImplicitType|) - } - -ValueParametersTypes: -FILE: delegates.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(valueWithExplicitType#) - receive#(valueWithImplicitType#) - variableWithExplicitType# = IntegerLiteral(10) - variableWithImplicitType# = IntegerLiteral(10) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] val delegate: = object : ReadWriteProperty { - private [RAW_FIR] [ContainingClassKey=] constructor(): R|| { - super<>() - } - - public? open? override [RAW_FIR] fun getValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>): Int { - ^getValue IntegerLiteral(1) - } - - public? open? override [RAW_FIR] fun setValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>, [RAW_FIR] value: Int): R|kotlin/Unit| { - } - - } - - [TYPES] public? get(): - public? final? [RAW_FIR] val valueWithExplicitType: Intby delegate# - [RAW_FIR] public? get(): { - ^ D|/valueWithExplicitType|.getValue#(Null(null), ::R|/valueWithExplicitType|) - } - public? final? [RAW_FIR] val valueWithImplicitType: by delegate# - [RAW_FIR] public? get(): { - ^ D|/valueWithImplicitType|.getValue#(Null(null), ::R|/valueWithImplicitType|) - } - public? final? [RAW_FIR] var variableWithExplicitType: Intby delegate# - [RAW_FIR] public? get(): { - ^ D|/variableWithExplicitType|.getValue#(Null(null), ::R|/variableWithExplicitType|) - } - [RAW_FIR] public? set([RAW_FIR] : ): R|kotlin/Unit| { - D|/variableWithExplicitType|.setValue#(Null(null), ::R|/variableWithExplicitType|, R|/variableWithExplicitType|) - } - public? final? [RAW_FIR] var variableWithImplicitType: by delegate# - [RAW_FIR] public? get(): { - ^ D|/variableWithImplicitType|.getValue#(Null(null), ::R|/variableWithImplicitType|) - } - [RAW_FIR] public? set([RAW_FIR] : ): R|kotlin/Unit| { - D|/variableWithImplicitType|.setValue#(Null(null), ::R|/variableWithImplicitType|, R|/variableWithImplicitType|) - } - -TypeParametersTypes: -FILE: delegates.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(valueWithExplicitType#) - receive#(valueWithImplicitType#) - variableWithExplicitType# = IntegerLiteral(10) - variableWithImplicitType# = IntegerLiteral(10) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] val delegate: = object : ReadWriteProperty { - private [RAW_FIR] [ContainingClassKey=] constructor(): R|| { - super<>() - } - - public? open? override [RAW_FIR] fun getValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>): Int { - ^getValue IntegerLiteral(1) - } - - public? open? override [RAW_FIR] fun setValue([RAW_FIR] thisRef: Any?, [RAW_FIR] property: KProperty<*>, [RAW_FIR] value: Int): R|kotlin/Unit| { - } - - } - - [TYPES] public? get(): - public? final? [RAW_FIR] val valueWithExplicitType: Intby delegate# - [RAW_FIR] public? get(): { - ^ D|/valueWithExplicitType|.getValue#(Null(null), ::R|/valueWithExplicitType|) - } - public? final? [RAW_FIR] val valueWithImplicitType: by delegate# - [RAW_FIR] public? get(): { - ^ D|/valueWithImplicitType|.getValue#(Null(null), ::R|/valueWithImplicitType|) - } - public? final? [RAW_FIR] var variableWithExplicitType: Intby delegate# - [RAW_FIR] public? get(): { - ^ D|/variableWithExplicitType|.getValue#(Null(null), ::R|/variableWithExplicitType|) - } - [RAW_FIR] public? set([RAW_FIR] : ): R|kotlin/Unit| { - D|/variableWithExplicitType|.setValue#(Null(null), ::R|/variableWithExplicitType|, R|/variableWithExplicitType|) - } - public? final? [RAW_FIR] var variableWithImplicitType: by delegate# - [RAW_FIR] public? get(): { - ^ D|/variableWithImplicitType|.getValue#(Null(null), ::R|/variableWithImplicitType|) - } - [RAW_FIR] public? set([RAW_FIR] : ): R|kotlin/Unit| { - D|/variableWithImplicitType|.setValue#(Null(null), ::R|/variableWithImplicitType|, R|/variableWithImplicitType|) - } - FILE RAW TO BODY: FILE: delegates.kt public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { diff --git a/analysis/low-level-api-fir/testdata/lazyResolve/functionWithParameter.txt b/analysis/low-level-api-fir/testdata/lazyResolve/functionWithParameter.txt index 5dd604c7cb1..b8e594ade78 100644 --- a/analysis/low-level-api-fir/testdata/lazyResolve/functionWithParameter.txt +++ b/analysis/low-level-api-fir/testdata/lazyResolve/functionWithParameter.txt @@ -1,50 +1,39 @@ + RAW_FIR: FILE: functionWithParameter.kt public? final? [RAW_FIR] interface I : R|kotlin/Any| { } - public? final? [RAW_FIR] fun resolveMe([RAW_FIR] param: I): { - ^resolveMe Unit# - } + public? final? [RAW_FIR] fun resolveMe([RAW_FIR] param: I): { LAZY_BLOCK } IMPORTS: FILE: functionWithParameter.kt public? final? [RAW_FIR] interface I : R|kotlin/Any| { } - public? final? [RAW_FIR] fun resolveMe([RAW_FIR] param: I): { - ^resolveMe Unit# - } + public? final? [RAW_FIR] fun resolveMe([RAW_FIR] param: I): { LAZY_BLOCK } SUPER_TYPES: FILE: functionWithParameter.kt public? final? [RAW_FIR] interface I : R|kotlin/Any| { } - public? final? [SUPER_TYPES] fun resolveMe([RAW_FIR] param: I): { - ^resolveMe Unit# - } + public? final? [SUPER_TYPES] fun resolveMe([RAW_FIR] param: I): { LAZY_BLOCK } TYPES: FILE: functionWithParameter.kt public? final? [RAW_FIR] interface I : R|kotlin/Any| { } - public? final? [TYPES] fun resolveMe([RAW_FIR] param: R|I|): { - ^resolveMe Unit# - } + public? final? [TYPES] fun resolveMe([RAW_FIR] param: R|I|): { LAZY_BLOCK } STATUS: FILE: functionWithParameter.kt public? final? [RAW_FIR] interface I : R|kotlin/Any| { } - public final [STATUS] fun resolveMe([RAW_FIR] param: R|I|): { - ^resolveMe Unit# - } + public final [STATUS] fun resolveMe([RAW_FIR] param: R|I|): { LAZY_BLOCK } ARGUMENTS_OF_ANNOTATIONS: FILE: functionWithParameter.kt public? final? [RAW_FIR] interface I : R|kotlin/Any| { } - public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe([RAW_FIR] param: R|I|): { - ^resolveMe Unit# - } + public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe([RAW_FIR] param: R|I|): { LAZY_BLOCK } CONTRACTS: FILE: functionWithParameter.kt @@ -70,86 +59,6 @@ FILE: functionWithParameter.kt ^resolveMe Q|kotlin/Unit| } -NoResolve: -FILE: functionWithParameter.kt - public? final? [RAW_FIR] interface I : R|kotlin/Any| { - } - public? final? [RAW_FIR] fun resolveMe([RAW_FIR] param: I): { - ^resolveMe Unit# - } - -BodyResolveWithChildren: -FILE: functionWithParameter.kt - public? final? [RAW_FIR] interface I : R|kotlin/Any| { - } - public final [BODY_RESOLVE] fun resolveMe([BODY_RESOLVE] param: R|I|): R|kotlin/Unit| { - ^resolveMe Q|kotlin/Unit| - } - -CallableBodyResolve: -FILE: functionWithParameter.kt - public? final? [RAW_FIR] interface I : R|kotlin/Any| { - } - public final [BODY_RESOLVE] fun resolveMe([BODY_RESOLVE] param: R|I|): R|kotlin/Unit| { - ^resolveMe Q|kotlin/Unit| - } - -CallableReturnType: -FILE: functionWithParameter.kt - public? final? [RAW_FIR] interface I : R|kotlin/Any| { - } - public final [IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe([RAW_FIR] param: R|I|): R|kotlin/Unit| { - ^resolveMe Q|kotlin/Unit| - } - -AnnotationType: -FILE: functionWithParameter.kt - public? final? [RAW_FIR] interface I : R|kotlin/Any| { - } - public? final? [TYPES] fun resolveMe([RAW_FIR] param: R|I|): { - ^resolveMe Unit# - } - -AnnotationsArguments: -FILE: functionWithParameter.kt - public? final? [RAW_FIR] interface I : R|kotlin/Any| { - } - public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe([RAW_FIR] param: R|I|): { - ^resolveMe Unit# - } - -CallableContracts: -FILE: functionWithParameter.kt - public? final? [RAW_FIR] interface I : R|kotlin/Any| { - } - public final [CONTRACTS] fun resolveMe([RAW_FIR] param: R|I|): { - ^resolveMe Unit# - } - -DeclarationStatus: -FILE: functionWithParameter.kt - public? final? [RAW_FIR] interface I : R|kotlin/Any| { - } - public final [STATUS] fun resolveMe([RAW_FIR] param: R|I|): { - ^resolveMe Unit# - } - -ValueParametersTypes: -FILE: functionWithParameter.kt - public? final? [RAW_FIR] interface I : R|kotlin/Any| { - } - public? final? [TYPES] fun resolveMe([RAW_FIR] param: R|I|): { - ^resolveMe Unit# - } - -TypeParametersTypes: -FILE: functionWithParameter.kt - public? final? [RAW_FIR] interface I : R|kotlin/Any| { - } - public? final? [TYPES] fun resolveMe([RAW_FIR] param: R|I|): { - ^resolveMe Unit# - } - FILE RAW TO BODY: FILE: functionWithParameter.kt public abstract [BODY_RESOLVE] interface I : R|kotlin/Any| { diff --git a/analysis/low-level-api-fir/testdata/lazyResolve/parameterOfNonLocalSetter.txt b/analysis/low-level-api-fir/testdata/lazyResolve/parameterOfNonLocalSetter.txt index 918310fb20d..08c759d4c68 100644 --- a/analysis/low-level-api-fir/testdata/lazyResolve/parameterOfNonLocalSetter.txt +++ b/analysis/low-level-api-fir/testdata/lazyResolve/parameterOfNonLocalSetter.txt @@ -1,3 +1,4 @@ + RAW_FIR: FILE: parameterOfNonLocalSetter.kt public? final? [RAW_FIR] class X : R|kotlin/Any| { @@ -5,11 +6,9 @@ FILE: parameterOfNonLocalSetter.kt super() } - public? final? [RAW_FIR] var x: Int = IntegerLiteral(2) + public? final? [RAW_FIR] var x: Int = LAZY_EXPRESSION [TYPES] [ContainingClassKey=X] public? get(): Int - [RAW_FIR] [ContainingClassKey=X] public? set([RAW_FIR] resolveMe: Int): R|kotlin/Unit| { - ^ Unit# - } + [RAW_FIR] [ContainingClassKey=X] public? set([RAW_FIR] resolveMe: Int): R|kotlin/Unit| { LAZY_BLOCK } } @@ -20,11 +19,9 @@ FILE: parameterOfNonLocalSetter.kt super() } - public? final? [RAW_FIR] var x: Int = IntegerLiteral(2) + public? final? [RAW_FIR] var x: Int = LAZY_EXPRESSION [TYPES] [ContainingClassKey=X] public? get(): Int - [RAW_FIR] [ContainingClassKey=X] public? set([RAW_FIR] resolveMe: Int): R|kotlin/Unit| { - ^ Unit# - } + [RAW_FIR] [ContainingClassKey=X] public? set([RAW_FIR] resolveMe: Int): R|kotlin/Unit| { LAZY_BLOCK } } @@ -35,11 +32,9 @@ FILE: parameterOfNonLocalSetter.kt super() } - public? final? [SUPER_TYPES] var x: Int = IntegerLiteral(2) + public? final? [SUPER_TYPES] var x: Int = LAZY_EXPRESSION [TYPES] [ContainingClassKey=X] public? get(): Int - [SUPER_TYPES] [ContainingClassKey=X] public? set([RAW_FIR] resolveMe: Int): R|kotlin/Unit| { - ^ Unit# - } + [SUPER_TYPES] [ContainingClassKey=X] public? set([RAW_FIR] resolveMe: Int): R|kotlin/Unit| { LAZY_BLOCK } } @@ -50,11 +45,9 @@ FILE: parameterOfNonLocalSetter.kt super() } - public? final? [TYPES] var x: R|kotlin/Int| = IntegerLiteral(2) + public? final? [TYPES] var x: R|kotlin/Int| = LAZY_EXPRESSION [TYPES] [ContainingClassKey=X] public? get(): R|kotlin/Int| - [TYPES] [ContainingClassKey=X] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { - ^ Unit# - } + [TYPES] [ContainingClassKey=X] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { LAZY_BLOCK } } @@ -65,11 +58,9 @@ FILE: parameterOfNonLocalSetter.kt super() } - public final [STATUS] var x: R|kotlin/Int| = IntegerLiteral(2) + public final [STATUS] var x: R|kotlin/Int| = LAZY_EXPRESSION [BODY_RESOLVE] [ContainingClassKey=X] public get(): R|kotlin/Int| - [STATUS] [ContainingClassKey=X] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { - ^ Unit# - } + [STATUS] [ContainingClassKey=X] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { LAZY_BLOCK } } @@ -80,11 +71,9 @@ FILE: parameterOfNonLocalSetter.kt super() } - public final [ARGUMENTS_OF_ANNOTATIONS] var x: R|kotlin/Int| = IntegerLiteral(2) + public final [ARGUMENTS_OF_ANNOTATIONS] var x: R|kotlin/Int| = LAZY_EXPRESSION [BODY_RESOLVE] [ContainingClassKey=X] public get(): R|kotlin/Int| - [ARGUMENTS_OF_ANNOTATIONS] [ContainingClassKey=X] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { - ^ Unit# - } + [ARGUMENTS_OF_ANNOTATIONS] [ContainingClassKey=X] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { LAZY_BLOCK } } @@ -133,156 +122,6 @@ FILE: parameterOfNonLocalSetter.kt } -NoResolve: -FILE: parameterOfNonLocalSetter.kt - public? final? [RAW_FIR] class X : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { - super() - } - - public? final? [RAW_FIR] var x: Int = IntegerLiteral(2) - [TYPES] [ContainingClassKey=X] public? get(): Int - [RAW_FIR] [ContainingClassKey=X] public? set([RAW_FIR] resolveMe: Int): R|kotlin/Unit| { - ^ Unit# - } - - } - -BodyResolveWithChildren: -FILE: parameterOfNonLocalSetter.kt - public final [STATUS] class X : R|kotlin/Any| { - public [STATUS] [ContainingClassKey=X] constructor(): R|X| { - super() - } - - public final [BODY_RESOLVE] var x: R|kotlin/Int| = Int(2) - [BODY_RESOLVE] [ContainingClassKey=X] public get(): R|kotlin/Int| - [BODY_RESOLVE] [ContainingClassKey=X] public set([BODY_RESOLVE] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { - ^ Q|kotlin/Unit| - } - - } - -CallableBodyResolve: -FILE: parameterOfNonLocalSetter.kt - public final [STATUS] class X : R|kotlin/Any| { - public [STATUS] [ContainingClassKey=X] constructor(): R|X| { - super() - } - - public final [BODY_RESOLVE] var x: R|kotlin/Int| = Int(2) - [BODY_RESOLVE] [ContainingClassKey=X] public get(): R|kotlin/Int| - [BODY_RESOLVE] [ContainingClassKey=X] public set([BODY_RESOLVE] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { - ^ Q|kotlin/Unit| - } - - } - -CallableReturnType: -FILE: parameterOfNonLocalSetter.kt - public? final? [SUPER_TYPES] class X : R|kotlin/Any| { - public? [SUPER_TYPES] [ContainingClassKey=X] constructor(): R|X| { - super() - } - - public? final? [TYPES] var x: R|kotlin/Int| = IntegerLiteral(2) - [TYPES] [ContainingClassKey=X] public? get(): R|kotlin/Int| - [TYPES] [ContainingClassKey=X] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { - ^ Unit# - } - - } - -AnnotationType: -FILE: parameterOfNonLocalSetter.kt - public? final? [SUPER_TYPES] class X : R|kotlin/Any| { - public? [SUPER_TYPES] [ContainingClassKey=X] constructor(): R|X| { - super() - } - - public? final? [TYPES] var x: R|kotlin/Int| = IntegerLiteral(2) - [TYPES] [ContainingClassKey=X] public? get(): R|kotlin/Int| - [TYPES] [ContainingClassKey=X] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { - ^ Unit# - } - - } - -AnnotationsArguments: -FILE: parameterOfNonLocalSetter.kt - public final [SUPER_TYPES] class X : R|kotlin/Any| { - public? [SUPER_TYPES] [ContainingClassKey=X] constructor(): R|X| { - super() - } - - public final [ARGUMENTS_OF_ANNOTATIONS] var x: R|kotlin/Int| = IntegerLiteral(2) - [BODY_RESOLVE] [ContainingClassKey=X] public get(): R|kotlin/Int| - [ARGUMENTS_OF_ANNOTATIONS] [ContainingClassKey=X] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { - ^ Unit# - } - - } - -CallableContracts: -FILE: parameterOfNonLocalSetter.kt - public final [SUPER_TYPES] class X : R|kotlin/Any| { - public? [SUPER_TYPES] [ContainingClassKey=X] constructor(): R|X| { - super() - } - - public final [CONTRACTS] var x: R|kotlin/Int| = IntegerLiteral(2) - [BODY_RESOLVE] [ContainingClassKey=X] public get(): R|kotlin/Int| - [CONTRACTS] [ContainingClassKey=X] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { - ^ Unit# - } - - } - -DeclarationStatus: -FILE: parameterOfNonLocalSetter.kt - public final [SUPER_TYPES] class X : R|kotlin/Any| { - public? [SUPER_TYPES] [ContainingClassKey=X] constructor(): R|X| { - super() - } - - public final [STATUS] var x: R|kotlin/Int| = IntegerLiteral(2) - [BODY_RESOLVE] [ContainingClassKey=X] public get(): R|kotlin/Int| - [STATUS] [ContainingClassKey=X] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { - ^ Unit# - } - - } - -ValueParametersTypes: -FILE: parameterOfNonLocalSetter.kt - public? final? [SUPER_TYPES] class X : R|kotlin/Any| { - public? [SUPER_TYPES] [ContainingClassKey=X] constructor(): R|X| { - super() - } - - public? final? [TYPES] var x: R|kotlin/Int| = IntegerLiteral(2) - [TYPES] [ContainingClassKey=X] public? get(): R|kotlin/Int| - [TYPES] [ContainingClassKey=X] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { - ^ Unit# - } - - } - -TypeParametersTypes: -FILE: parameterOfNonLocalSetter.kt - public? final? [SUPER_TYPES] class X : R|kotlin/Any| { - public? [SUPER_TYPES] [ContainingClassKey=X] constructor(): R|X| { - super() - } - - public? final? [TYPES] var x: R|kotlin/Int| = IntegerLiteral(2) - [TYPES] [ContainingClassKey=X] public? get(): R|kotlin/Int| - [TYPES] [ContainingClassKey=X] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { - ^ Unit# - } - - } - FILE RAW TO BODY: FILE: parameterOfNonLocalSetter.kt public final [BODY_RESOLVE] class X : R|kotlin/Any| { diff --git a/analysis/low-level-api-fir/testdata/lazyResolve/propertyWithGetter.txt b/analysis/low-level-api-fir/testdata/lazyResolve/propertyWithGetter.txt index 039f4a88878..36d92f3a106 100644 --- a/analysis/low-level-api-fir/testdata/lazyResolve/propertyWithGetter.txt +++ b/analysis/low-level-api-fir/testdata/lazyResolve/propertyWithGetter.txt @@ -1,230 +1,72 @@ + RAW_FIR: FILE: propertyWithGetter.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(withGetter#) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } + public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } public? final? [RAW_FIR] val withGetter: Int - [RAW_FIR] public? get(): Int { - ^ IntegerLiteral(42) - } + [RAW_FIR] public? get(): Int { LAZY_BLOCK } IMPORTS: FILE: propertyWithGetter.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(withGetter#) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } + public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } public? final? [RAW_FIR] val withGetter: Int - [RAW_FIR] public? get(): Int { - ^ IntegerLiteral(42) - } + [RAW_FIR] public? get(): Int { LAZY_BLOCK } SUPER_TYPES: FILE: propertyWithGetter.kt - public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(withGetter#) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } + public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } public? final? [RAW_FIR] val withGetter: Int - [RAW_FIR] public? get(): Int { - ^ IntegerLiteral(42) - } + [RAW_FIR] public? get(): Int { LAZY_BLOCK } TYPES: FILE: propertyWithGetter.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(withGetter#) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } public? final? [RAW_FIR] val withGetter: Int - [RAW_FIR] public? get(): Int { - ^ IntegerLiteral(42) - } + [RAW_FIR] public? get(): Int { LAZY_BLOCK } STATUS: FILE: propertyWithGetter.kt - public final [STATUS] fun resolveMe(): R|kotlin/Unit| { - receive#(withGetter#) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } + public final [STATUS] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } public? final? [RAW_FIR] val withGetter: Int - [RAW_FIR] public? get(): Int { - ^ IntegerLiteral(42) - } + [RAW_FIR] public? get(): Int { LAZY_BLOCK } ARGUMENTS_OF_ANNOTATIONS: FILE: propertyWithGetter.kt - public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { - receive#(withGetter#) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } + public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } public? final? [RAW_FIR] val withGetter: Int - [RAW_FIR] public? get(): Int { - ^ IntegerLiteral(42) - } + [RAW_FIR] public? get(): Int { LAZY_BLOCK } CONTRACTS: FILE: propertyWithGetter.kt public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { receive#(withGetter#) } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } public? final? [RAW_FIR] val withGetter: Int - [RAW_FIR] public? get(): Int { - ^ IntegerLiteral(42) - } + [RAW_FIR] public? get(): Int { LAZY_BLOCK } IMPLICIT_TYPES_BODY_RESOLVE: FILE: propertyWithGetter.kt public final [IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { receive#(withGetter#) } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } public? final? [RAW_FIR] val withGetter: Int - [RAW_FIR] public? get(): Int { - ^ IntegerLiteral(42) - } + [RAW_FIR] public? get(): Int { LAZY_BLOCK } BODY_RESOLVE: FILE: propertyWithGetter.kt public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/withGetter|) } - public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { - } + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { LAZY_BLOCK } public final [STATUS] val withGetter: R|kotlin/Int| - [STATUS] public get(): R|kotlin/Int| { - ^ IntegerLiteral(42) - } - -NoResolve: -FILE: propertyWithGetter.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(withGetter#) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] val withGetter: Int - [RAW_FIR] public? get(): Int { - ^ IntegerLiteral(42) - } - -BodyResolveWithChildren: -FILE: propertyWithGetter.kt - public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { - R|/receive|(R|/withGetter|) - } - public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { - } - public final [STATUS] val withGetter: R|kotlin/Int| - [STATUS] public get(): R|kotlin/Int| { - ^ IntegerLiteral(42) - } - -CallableBodyResolve: -FILE: propertyWithGetter.kt - public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { - R|/receive|(R|/withGetter|) - } - public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { - } - public final [STATUS] val withGetter: R|kotlin/Int| - [STATUS] public get(): R|kotlin/Int| { - ^ IntegerLiteral(42) - } - -CallableReturnType: -FILE: propertyWithGetter.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(withGetter#) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] val withGetter: Int - [RAW_FIR] public? get(): Int { - ^ IntegerLiteral(42) - } - -AnnotationType: -FILE: propertyWithGetter.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(withGetter#) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] val withGetter: Int - [RAW_FIR] public? get(): Int { - ^ IntegerLiteral(42) - } - -AnnotationsArguments: -FILE: propertyWithGetter.kt - public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { - receive#(withGetter#) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] val withGetter: Int - [RAW_FIR] public? get(): Int { - ^ IntegerLiteral(42) - } - -CallableContracts: -FILE: propertyWithGetter.kt - public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { - receive#(withGetter#) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] val withGetter: Int - [RAW_FIR] public? get(): Int { - ^ IntegerLiteral(42) - } - -DeclarationStatus: -FILE: propertyWithGetter.kt - public final [STATUS] fun resolveMe(): R|kotlin/Unit| { - receive#(withGetter#) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] val withGetter: Int - [RAW_FIR] public? get(): Int { - ^ IntegerLiteral(42) - } - -ValueParametersTypes: -FILE: propertyWithGetter.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(withGetter#) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] val withGetter: Int - [RAW_FIR] public? get(): Int { - ^ IntegerLiteral(42) - } - -TypeParametersTypes: -FILE: propertyWithGetter.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(withGetter#) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] val withGetter: Int - [RAW_FIR] public? get(): Int { - ^ IntegerLiteral(42) - } + [STATUS] public get(): R|kotlin/Int| { LAZY_BLOCK } FILE RAW TO BODY: FILE: propertyWithGetter.kt diff --git a/analysis/low-level-api-fir/testdata/lazyResolve/propertyWithGetterAndSetter.txt b/analysis/low-level-api-fir/testdata/lazyResolve/propertyWithGetterAndSetter.txt index 1d23eeb14c4..1e675e21740 100644 --- a/analysis/low-level-api-fir/testdata/lazyResolve/propertyWithGetterAndSetter.txt +++ b/analysis/low-level-api-fir/testdata/lazyResolve/propertyWithGetterAndSetter.txt @@ -1,98 +1,51 @@ + RAW_FIR: FILE: propertyWithGetterAndSetter.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(withGetterAndSetter#) - withGetterAndSetter# = IntegerLiteral(123) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] var withGetterAndSetter: Int = IntegerLiteral(42) - [RAW_FIR] public? get(): Int { - ^ field# - } - [RAW_FIR] public? set([RAW_FIR] value: Int): R|kotlin/Unit| { - field# = value# - } + public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] var withGetterAndSetter: Int = LAZY_EXPRESSION + [RAW_FIR] public? get(): Int { LAZY_BLOCK } + [RAW_FIR] public? set([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } IMPORTS: FILE: propertyWithGetterAndSetter.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(withGetterAndSetter#) - withGetterAndSetter# = IntegerLiteral(123) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] var withGetterAndSetter: Int = IntegerLiteral(42) - [RAW_FIR] public? get(): Int { - ^ field# - } - [RAW_FIR] public? set([RAW_FIR] value: Int): R|kotlin/Unit| { - field# = value# - } + public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] var withGetterAndSetter: Int = LAZY_EXPRESSION + [RAW_FIR] public? get(): Int { LAZY_BLOCK } + [RAW_FIR] public? set([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } SUPER_TYPES: FILE: propertyWithGetterAndSetter.kt - public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(withGetterAndSetter#) - withGetterAndSetter# = IntegerLiteral(123) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] var withGetterAndSetter: Int = IntegerLiteral(42) - [RAW_FIR] public? get(): Int { - ^ field# - } - [RAW_FIR] public? set([RAW_FIR] value: Int): R|kotlin/Unit| { - field# = value# - } + public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] var withGetterAndSetter: Int = LAZY_EXPRESSION + [RAW_FIR] public? get(): Int { LAZY_BLOCK } + [RAW_FIR] public? set([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } TYPES: FILE: propertyWithGetterAndSetter.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(withGetterAndSetter#) - withGetterAndSetter# = IntegerLiteral(123) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] var withGetterAndSetter: Int = IntegerLiteral(42) - [RAW_FIR] public? get(): Int { - ^ field# - } - [RAW_FIR] public? set([RAW_FIR] value: Int): R|kotlin/Unit| { - field# = value# - } + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] var withGetterAndSetter: Int = LAZY_EXPRESSION + [RAW_FIR] public? get(): Int { LAZY_BLOCK } + [RAW_FIR] public? set([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } STATUS: FILE: propertyWithGetterAndSetter.kt - public final [STATUS] fun resolveMe(): R|kotlin/Unit| { - receive#(withGetterAndSetter#) - withGetterAndSetter# = IntegerLiteral(123) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] var withGetterAndSetter: Int = IntegerLiteral(42) - [RAW_FIR] public? get(): Int { - ^ field# - } - [RAW_FIR] public? set([RAW_FIR] value: Int): R|kotlin/Unit| { - field# = value# - } + public final [STATUS] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] var withGetterAndSetter: Int = LAZY_EXPRESSION + [RAW_FIR] public? get(): Int { LAZY_BLOCK } + [RAW_FIR] public? set([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } ARGUMENTS_OF_ANNOTATIONS: FILE: propertyWithGetterAndSetter.kt - public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { - receive#(withGetterAndSetter#) - withGetterAndSetter# = IntegerLiteral(123) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] var withGetterAndSetter: Int = IntegerLiteral(42) - [RAW_FIR] public? get(): Int { - ^ field# - } - [RAW_FIR] public? set([RAW_FIR] value: Int): R|kotlin/Unit| { - field# = value# - } + public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] var withGetterAndSetter: Int = LAZY_EXPRESSION + [RAW_FIR] public? get(): Int { LAZY_BLOCK } + [RAW_FIR] public? set([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } CONTRACTS: FILE: propertyWithGetterAndSetter.kt @@ -100,15 +53,10 @@ FILE: propertyWithGetterAndSetter.kt receive#(withGetterAndSetter#) withGetterAndSetter# = IntegerLiteral(123) } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] var withGetterAndSetter: Int = IntegerLiteral(42) - [RAW_FIR] public? get(): Int { - ^ field# - } - [RAW_FIR] public? set([RAW_FIR] value: Int): R|kotlin/Unit| { - field# = value# - } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] var withGetterAndSetter: Int = LAZY_EXPRESSION + [RAW_FIR] public? get(): Int { LAZY_BLOCK } + [RAW_FIR] public? set([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } IMPLICIT_TYPES_BODY_RESOLVE: FILE: propertyWithGetterAndSetter.kt @@ -116,15 +64,10 @@ FILE: propertyWithGetterAndSetter.kt receive#(withGetterAndSetter#) withGetterAndSetter# = IntegerLiteral(123) } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] var withGetterAndSetter: Int = IntegerLiteral(42) - [RAW_FIR] public? get(): Int { - ^ field# - } - [RAW_FIR] public? set([RAW_FIR] value: Int): R|kotlin/Unit| { - field# = value# - } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] var withGetterAndSetter: Int = LAZY_EXPRESSION + [RAW_FIR] public? get(): Int { LAZY_BLOCK } + [RAW_FIR] public? set([RAW_FIR] value: Int): R|kotlin/Unit| { LAZY_BLOCK } BODY_RESOLVE: FILE: propertyWithGetterAndSetter.kt @@ -132,175 +75,10 @@ FILE: propertyWithGetterAndSetter.kt R|/receive|(R|/withGetterAndSetter|) R|/withGetterAndSetter| = Int(123) } - public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { - } - public final [STATUS] var withGetterAndSetter: R|kotlin/Int| = IntegerLiteral(42) - [STATUS] public get(): R|kotlin/Int| { - ^ field# - } - [STATUS] public set([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { - field# = value# - } - -NoResolve: -FILE: propertyWithGetterAndSetter.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(withGetterAndSetter#) - withGetterAndSetter# = IntegerLiteral(123) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] var withGetterAndSetter: Int = IntegerLiteral(42) - [RAW_FIR] public? get(): Int { - ^ field# - } - [RAW_FIR] public? set([RAW_FIR] value: Int): R|kotlin/Unit| { - field# = value# - } - -BodyResolveWithChildren: -FILE: propertyWithGetterAndSetter.kt - public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { - R|/receive|(R|/withGetterAndSetter|) - R|/withGetterAndSetter| = Int(123) - } - public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { - } - public final [STATUS] var withGetterAndSetter: R|kotlin/Int| = IntegerLiteral(42) - [STATUS] public get(): R|kotlin/Int| { - ^ field# - } - [STATUS] public set([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { - field# = value# - } - -CallableBodyResolve: -FILE: propertyWithGetterAndSetter.kt - public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { - R|/receive|(R|/withGetterAndSetter|) - R|/withGetterAndSetter| = Int(123) - } - public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { - } - public final [STATUS] var withGetterAndSetter: R|kotlin/Int| = IntegerLiteral(42) - [STATUS] public get(): R|kotlin/Int| { - ^ field# - } - [STATUS] public set([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { - field# = value# - } - -CallableReturnType: -FILE: propertyWithGetterAndSetter.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(withGetterAndSetter#) - withGetterAndSetter# = IntegerLiteral(123) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] var withGetterAndSetter: Int = IntegerLiteral(42) - [RAW_FIR] public? get(): Int { - ^ field# - } - [RAW_FIR] public? set([RAW_FIR] value: Int): R|kotlin/Unit| { - field# = value# - } - -AnnotationType: -FILE: propertyWithGetterAndSetter.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(withGetterAndSetter#) - withGetterAndSetter# = IntegerLiteral(123) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] var withGetterAndSetter: Int = IntegerLiteral(42) - [RAW_FIR] public? get(): Int { - ^ field# - } - [RAW_FIR] public? set([RAW_FIR] value: Int): R|kotlin/Unit| { - field# = value# - } - -AnnotationsArguments: -FILE: propertyWithGetterAndSetter.kt - public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { - receive#(withGetterAndSetter#) - withGetterAndSetter# = IntegerLiteral(123) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] var withGetterAndSetter: Int = IntegerLiteral(42) - [RAW_FIR] public? get(): Int { - ^ field# - } - [RAW_FIR] public? set([RAW_FIR] value: Int): R|kotlin/Unit| { - field# = value# - } - -CallableContracts: -FILE: propertyWithGetterAndSetter.kt - public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { - receive#(withGetterAndSetter#) - withGetterAndSetter# = IntegerLiteral(123) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] var withGetterAndSetter: Int = IntegerLiteral(42) - [RAW_FIR] public? get(): Int { - ^ field# - } - [RAW_FIR] public? set([RAW_FIR] value: Int): R|kotlin/Unit| { - field# = value# - } - -DeclarationStatus: -FILE: propertyWithGetterAndSetter.kt - public final [STATUS] fun resolveMe(): R|kotlin/Unit| { - receive#(withGetterAndSetter#) - withGetterAndSetter# = IntegerLiteral(123) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] var withGetterAndSetter: Int = IntegerLiteral(42) - [RAW_FIR] public? get(): Int { - ^ field# - } - [RAW_FIR] public? set([RAW_FIR] value: Int): R|kotlin/Unit| { - field# = value# - } - -ValueParametersTypes: -FILE: propertyWithGetterAndSetter.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(withGetterAndSetter#) - withGetterAndSetter# = IntegerLiteral(123) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] var withGetterAndSetter: Int = IntegerLiteral(42) - [RAW_FIR] public? get(): Int { - ^ field# - } - [RAW_FIR] public? set([RAW_FIR] value: Int): R|kotlin/Unit| { - field# = value# - } - -TypeParametersTypes: -FILE: propertyWithGetterAndSetter.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(withGetterAndSetter#) - withGetterAndSetter# = IntegerLiteral(123) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: Int): R|kotlin/Unit| { - } - public? final? [RAW_FIR] var withGetterAndSetter: Int = IntegerLiteral(42) - [RAW_FIR] public? get(): Int { - ^ field# - } - [RAW_FIR] public? set([RAW_FIR] value: Int): R|kotlin/Unit| { - field# = value# - } + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { LAZY_BLOCK } + public final [STATUS] var withGetterAndSetter: R|kotlin/Int| = LAZY_EXPRESSION + [STATUS] public get(): R|kotlin/Int| { LAZY_BLOCK } + [STATUS] public set([RAW_FIR] value: R|kotlin/Int|): R|kotlin/Unit| { LAZY_BLOCK } FILE RAW TO BODY: FILE: propertyWithGetterAndSetter.kt diff --git a/analysis/low-level-api-fir/testdata/lazyResolve/propertyWithInitializer.txt b/analysis/low-level-api-fir/testdata/lazyResolve/propertyWithInitializer.txt index b296707eaef..90b0661fb38 100644 --- a/analysis/low-level-api-fir/testdata/lazyResolve/propertyWithInitializer.txt +++ b/analysis/low-level-api-fir/testdata/lazyResolve/propertyWithInitializer.txt @@ -1,49 +1,38 @@ + RAW_FIR: FILE: propertyWithInitializer.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(property#) - } - public? final? [RAW_FIR] val property: Int = IntegerLiteral(10) + public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] val property: Int = LAZY_EXPRESSION [TYPES] public? get(): Int IMPORTS: FILE: propertyWithInitializer.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(property#) - } - public? final? [RAW_FIR] val property: Int = IntegerLiteral(10) + public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] val property: Int = LAZY_EXPRESSION [TYPES] public? get(): Int SUPER_TYPES: FILE: propertyWithInitializer.kt - public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(property#) - } - public? final? [RAW_FIR] val property: Int = IntegerLiteral(10) + public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] val property: Int = LAZY_EXPRESSION [TYPES] public? get(): Int TYPES: FILE: propertyWithInitializer.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(property#) - } - public? final? [RAW_FIR] val property: Int = IntegerLiteral(10) + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] val property: Int = LAZY_EXPRESSION [TYPES] public? get(): Int STATUS: FILE: propertyWithInitializer.kt - public final [STATUS] fun resolveMe(): R|kotlin/Unit| { - receive#(property#) - } - public? final? [RAW_FIR] val property: Int = IntegerLiteral(10) + public final [STATUS] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] val property: Int = LAZY_EXPRESSION [TYPES] public? get(): Int ARGUMENTS_OF_ANNOTATIONS: FILE: propertyWithInitializer.kt - public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { - receive#(property#) - } - public? final? [RAW_FIR] val property: Int = IntegerLiteral(10) + public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] val property: Int = LAZY_EXPRESSION [TYPES] public? get(): Int CONTRACTS: @@ -51,7 +40,7 @@ FILE: propertyWithInitializer.kt public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { receive#(property#) } - public? final? [RAW_FIR] val property: Int = IntegerLiteral(10) + public? final? [RAW_FIR] val property: Int = LAZY_EXPRESSION [TYPES] public? get(): Int IMPLICIT_TYPES_BODY_RESOLVE: @@ -59,7 +48,7 @@ FILE: propertyWithInitializer.kt public final [IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { receive#(property#) } - public? final? [RAW_FIR] val property: Int = IntegerLiteral(10) + public? final? [RAW_FIR] val property: Int = LAZY_EXPRESSION [TYPES] public? get(): Int BODY_RESOLVE: @@ -67,89 +56,9 @@ FILE: propertyWithInitializer.kt public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { #(R|/property|) } - public final [STATUS] val property: R|kotlin/Int| = IntegerLiteral(10) + public final [STATUS] val property: R|kotlin/Int| = LAZY_EXPRESSION [BODY_RESOLVE] public get(): R|kotlin/Int| -NoResolve: -FILE: propertyWithInitializer.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(property#) - } - public? final? [RAW_FIR] val property: Int = IntegerLiteral(10) - [TYPES] public? get(): Int - -BodyResolveWithChildren: -FILE: propertyWithInitializer.kt - public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { - #(R|/property|) - } - public final [STATUS] val property: R|kotlin/Int| = IntegerLiteral(10) - [BODY_RESOLVE] public get(): R|kotlin/Int| - -CallableBodyResolve: -FILE: propertyWithInitializer.kt - public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { - #(R|/property|) - } - public final [STATUS] val property: R|kotlin/Int| = IntegerLiteral(10) - [BODY_RESOLVE] public get(): R|kotlin/Int| - -CallableReturnType: -FILE: propertyWithInitializer.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(property#) - } - public? final? [RAW_FIR] val property: Int = IntegerLiteral(10) - [TYPES] public? get(): Int - -AnnotationType: -FILE: propertyWithInitializer.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(property#) - } - public? final? [RAW_FIR] val property: Int = IntegerLiteral(10) - [TYPES] public? get(): Int - -AnnotationsArguments: -FILE: propertyWithInitializer.kt - public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { - receive#(property#) - } - public? final? [RAW_FIR] val property: Int = IntegerLiteral(10) - [TYPES] public? get(): Int - -CallableContracts: -FILE: propertyWithInitializer.kt - public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { - receive#(property#) - } - public? final? [RAW_FIR] val property: Int = IntegerLiteral(10) - [TYPES] public? get(): Int - -DeclarationStatus: -FILE: propertyWithInitializer.kt - public final [STATUS] fun resolveMe(): R|kotlin/Unit| { - receive#(property#) - } - public? final? [RAW_FIR] val property: Int = IntegerLiteral(10) - [TYPES] public? get(): Int - -ValueParametersTypes: -FILE: propertyWithInitializer.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(property#) - } - public? final? [RAW_FIR] val property: Int = IntegerLiteral(10) - [TYPES] public? get(): Int - -TypeParametersTypes: -FILE: propertyWithInitializer.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(property#) - } - public? final? [RAW_FIR] val property: Int = IntegerLiteral(10) - [TYPES] public? get(): Int - FILE RAW TO BODY: FILE: propertyWithInitializer.kt public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { diff --git a/analysis/low-level-api-fir/testdata/lazyResolve/secondaryConstructor.txt b/analysis/low-level-api-fir/testdata/lazyResolve/secondaryConstructor.txt index b875c28f768..d434cc7fa2a 100644 --- a/analysis/low-level-api-fir/testdata/lazyResolve/secondaryConstructor.txt +++ b/analysis/low-level-api-fir/testdata/lazyResolve/secondaryConstructor.txt @@ -1,10 +1,8 @@ + RAW_FIR: FILE: secondaryConstructor.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(A#(IntegerLiteral(42))) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { - } + public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { LAZY_BLOCK } public? final? [RAW_FIR] class A : R|kotlin/Any| { public? [RAW_FIR] [ContainingClassKey=A] constructor([RAW_FIR] x: Int): R|A| { super() @@ -15,11 +13,8 @@ FILE: secondaryConstructor.kt IMPORTS: FILE: secondaryConstructor.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(A#(IntegerLiteral(42))) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { - } + public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { LAZY_BLOCK } public? final? [RAW_FIR] class A : R|kotlin/Any| { public? [RAW_FIR] [ContainingClassKey=A] constructor([RAW_FIR] x: Int): R|A| { super() @@ -30,11 +25,8 @@ FILE: secondaryConstructor.kt SUPER_TYPES: FILE: secondaryConstructor.kt - public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(A#(IntegerLiteral(42))) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { - } + public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { LAZY_BLOCK } public? final? [RAW_FIR] class A : R|kotlin/Any| { public? [RAW_FIR] [ContainingClassKey=A] constructor([RAW_FIR] x: Int): R|A| { super() @@ -45,11 +37,8 @@ FILE: secondaryConstructor.kt TYPES: FILE: secondaryConstructor.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(A#(IntegerLiteral(42))) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { - } + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { LAZY_BLOCK } public? final? [RAW_FIR] class A : R|kotlin/Any| { public? [RAW_FIR] [ContainingClassKey=A] constructor([RAW_FIR] x: Int): R|A| { super() @@ -60,11 +49,8 @@ FILE: secondaryConstructor.kt STATUS: FILE: secondaryConstructor.kt - public final [STATUS] fun resolveMe(): R|kotlin/Unit| { - receive#(A#(IntegerLiteral(42))) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { - } + public final [STATUS] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { LAZY_BLOCK } public? final? [RAW_FIR] class A : R|kotlin/Any| { public? [RAW_FIR] [ContainingClassKey=A] constructor([RAW_FIR] x: Int): R|A| { super() @@ -75,11 +61,8 @@ FILE: secondaryConstructor.kt ARGUMENTS_OF_ANNOTATIONS: FILE: secondaryConstructor.kt - public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { - receive#(A#(IntegerLiteral(42))) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { - } + public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { LAZY_BLOCK } public? final? [RAW_FIR] class A : R|kotlin/Any| { public? [RAW_FIR] [ContainingClassKey=A] constructor([RAW_FIR] x: Int): R|A| { super() @@ -93,8 +76,7 @@ FILE: secondaryConstructor.kt public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { receive#(A#(IntegerLiteral(42))) } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { - } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { LAZY_BLOCK } public? final? [RAW_FIR] class A : R|kotlin/Any| { public? [RAW_FIR] [ContainingClassKey=A] constructor([RAW_FIR] x: Int): R|A| { super() @@ -108,8 +90,7 @@ FILE: secondaryConstructor.kt public final [IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { receive#(A#(IntegerLiteral(42))) } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { - } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { LAZY_BLOCK } public? final? [RAW_FIR] class A : R|kotlin/Any| { public? [RAW_FIR] [ContainingClassKey=A] constructor([RAW_FIR] x: Int): R|A| { super() @@ -123,8 +104,7 @@ FILE: secondaryConstructor.kt public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/A.A|(Int(42))) } - public final [STATUS] fun receive([RAW_FIR] value: R|A|): R|kotlin/Unit| { - } + public final [STATUS] fun receive([RAW_FIR] value: R|A|): R|kotlin/Unit| { LAZY_BLOCK } public final [STATUS] class A : R|kotlin/Any| { public [STATUS] [ContainingClassKey=A] constructor([RAW_FIR] x: R|kotlin/Int|): R|A| { super() @@ -133,156 +113,6 @@ FILE: secondaryConstructor.kt } -NoResolve: -FILE: secondaryConstructor.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(A#(IntegerLiteral(42))) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { - } - public? final? [RAW_FIR] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor([RAW_FIR] x: Int): R|A| { - super() - [RAW_FIR] lval a: = x# - } - - } - -BodyResolveWithChildren: -FILE: secondaryConstructor.kt - public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { - R|/receive|(R|/A.A|(Int(42))) - } - public final [STATUS] fun receive([RAW_FIR] value: R|A|): R|kotlin/Unit| { - } - public final [STATUS] class A : R|kotlin/Any| { - public [STATUS] [ContainingClassKey=A] constructor([RAW_FIR] x: R|kotlin/Int|): R|A| { - super() - [RAW_FIR] lval a: = x# - } - - } - -CallableBodyResolve: -FILE: secondaryConstructor.kt - public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { - R|/receive|(R|/A.A|(Int(42))) - } - public final [STATUS] fun receive([RAW_FIR] value: R|A|): R|kotlin/Unit| { - } - public final [STATUS] class A : R|kotlin/Any| { - public [STATUS] [ContainingClassKey=A] constructor([RAW_FIR] x: R|kotlin/Int|): R|A| { - super() - [RAW_FIR] lval a: = x# - } - - } - -CallableReturnType: -FILE: secondaryConstructor.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(A#(IntegerLiteral(42))) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { - } - public? final? [RAW_FIR] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor([RAW_FIR] x: Int): R|A| { - super() - [RAW_FIR] lval a: = x# - } - - } - -AnnotationType: -FILE: secondaryConstructor.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(A#(IntegerLiteral(42))) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { - } - public? final? [RAW_FIR] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor([RAW_FIR] x: Int): R|A| { - super() - [RAW_FIR] lval a: = x# - } - - } - -AnnotationsArguments: -FILE: secondaryConstructor.kt - public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { - receive#(A#(IntegerLiteral(42))) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { - } - public? final? [RAW_FIR] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor([RAW_FIR] x: Int): R|A| { - super() - [RAW_FIR] lval a: = x# - } - - } - -CallableContracts: -FILE: secondaryConstructor.kt - public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { - receive#(A#(IntegerLiteral(42))) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { - } - public? final? [RAW_FIR] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor([RAW_FIR] x: Int): R|A| { - super() - [RAW_FIR] lval a: = x# - } - - } - -DeclarationStatus: -FILE: secondaryConstructor.kt - public final [STATUS] fun resolveMe(): R|kotlin/Unit| { - receive#(A#(IntegerLiteral(42))) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { - } - public? final? [RAW_FIR] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor([RAW_FIR] x: Int): R|A| { - super() - [RAW_FIR] lval a: = x# - } - - } - -ValueParametersTypes: -FILE: secondaryConstructor.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(A#(IntegerLiteral(42))) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { - } - public? final? [RAW_FIR] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor([RAW_FIR] x: Int): R|A| { - super() - [RAW_FIR] lval a: = x# - } - - } - -TypeParametersTypes: -FILE: secondaryConstructor.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(A#(IntegerLiteral(42))) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: A): R|kotlin/Unit| { - } - public? final? [RAW_FIR] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor([RAW_FIR] x: Int): R|A| { - super() - [RAW_FIR] lval a: = x# - } - - } - FILE RAW TO BODY: FILE: secondaryConstructor.kt public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { diff --git a/analysis/low-level-api-fir/testdata/lazyResolve/superTypes.txt b/analysis/low-level-api-fir/testdata/lazyResolve/superTypes.txt index 4b4fcf34dae..1c3bffe35ea 100644 --- a/analysis/low-level-api-fir/testdata/lazyResolve/superTypes.txt +++ b/analysis/low-level-api-fir/testdata/lazyResolve/superTypes.txt @@ -1,3 +1,4 @@ + RAW_FIR: FILE: superTypes.kt public? open [RAW_FIR] class A : R|kotlin/Any| { @@ -187,174 +188,6 @@ FILE: superTypes.kt } -NoResolve: -FILE: superTypes.kt - public? open [RAW_FIR] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { - super() - } - - } - public? open [RAW_FIR] class B : A { - public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { - super() - } - - } - public? open [RAW_FIR] class resolveMe : A { - public? [RAW_FIR] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { - super() - } - - } - -BodyResolveWithChildren: -FILE: superTypes.kt - public open [STATUS] class A : R|kotlin/Any| { - public [STATUS] [ContainingClassKey=A] constructor(): R|A| { - super() - } - - } - public? open [RAW_FIR] class B : A { - public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { - super() - } - - } - public open [BODY_RESOLVE] class resolveMe : R|A| { - public [BODY_RESOLVE] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { - super() - } - - } - -AnnotationType: -FILE: superTypes.kt - public? open [SUPER_TYPES] class A : R|kotlin/Any| { - public? [SUPER_TYPES] [ContainingClassKey=A] constructor(): R|A| { - super() - } - - } - public? open [RAW_FIR] class B : A { - public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { - super() - } - - } - public? open [TYPES] class resolveMe : R|A| { - public? [TYPES] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { - super() - } - - } - -AnnotationsArguments: -FILE: superTypes.kt - public open [TYPES] class A : R|kotlin/Any| { - public [TYPES] [ContainingClassKey=A] constructor(): R|A| { - super() - } - - } - public? open [RAW_FIR] class B : A { - public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { - super() - } - - } - public open [ARGUMENTS_OF_ANNOTATIONS] class resolveMe : R|A| { - public [ARGUMENTS_OF_ANNOTATIONS] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { - super() - } - - } - -ClassSuperTypes: -FILE: superTypes.kt - public? open [RAW_FIR] class A : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { - super() - } - - } - public? open [RAW_FIR] class B : A { - public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { - super() - } - - } - public? open [SUPER_TYPES] class resolveMe : R|A| { - public? [SUPER_TYPES] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { - super() - } - - } - -DeclarationStatus: -FILE: superTypes.kt - public open [TYPES] class A : R|kotlin/Any| { - public [TYPES] [ContainingClassKey=A] constructor(): R|A| { - super() - } - - } - public? open [RAW_FIR] class B : A { - public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { - super() - } - - } - public open [STATUS] class resolveMe : R|A| { - public [STATUS] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { - super() - } - - } - -ValueParametersTypes: -FILE: superTypes.kt - public? open [SUPER_TYPES] class A : R|kotlin/Any| { - public? [SUPER_TYPES] [ContainingClassKey=A] constructor(): R|A| { - super() - } - - } - public? open [RAW_FIR] class B : A { - public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { - super() - } - - } - public? open [TYPES] class resolveMe : R|A| { - public? [TYPES] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { - super() - } - - } - -TypeParametersTypes: -FILE: superTypes.kt - public? open [SUPER_TYPES] class A : R|kotlin/Any| { - public? [SUPER_TYPES] [ContainingClassKey=A] constructor(): R|A| { - super() - } - - } - public? open [RAW_FIR] class B : A { - public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { - super() - } - - } - public? open [TYPES] class resolveMe : R|A| { - public? [TYPES] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { - super() - } - - } - FILE RAW TO BODY: FILE: superTypes.kt public open [BODY_RESOLVE] class A : R|kotlin/Any| { diff --git a/analysis/low-level-api-fir/testdata/lazyResolve/superTypesLoop.txt b/analysis/low-level-api-fir/testdata/lazyResolve/superTypesLoop.txt index d8033447d4c..1aec06a3044 100644 --- a/analysis/low-level-api-fir/testdata/lazyResolve/superTypesLoop.txt +++ b/analysis/low-level-api-fir/testdata/lazyResolve/superTypesLoop.txt @@ -1,3 +1,4 @@ + RAW_FIR: FILE: superTypesLoop.kt public? open [RAW_FIR] class resolveMe : C { @@ -241,222 +242,6 @@ FILE: superTypesLoop.kt } -NoResolve: -FILE: superTypesLoop.kt - public? open [RAW_FIR] class resolveMe : C { - public? [RAW_FIR] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { - super() - } - - } - public? open [RAW_FIR] class A : B { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { - super() - } - - } - public? open [RAW_FIR] class B : C { - public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { - super() - } - - } - public? open [RAW_FIR] class C : A { - public? [RAW_FIR] [ContainingClassKey=C] constructor(): R|C| { - super() - } - - } - -BodyResolveWithChildren: -FILE: superTypesLoop.kt - public open [BODY_RESOLVE] class resolveMe : R|C| { - public [BODY_RESOLVE] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { - super() - } - - } - public? open [RAW_FIR] class A : /B> { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { - super() - } - - } - public? open [RAW_FIR] class B : /C> { - public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { - super() - } - - } - public open [STATUS] class C : /A> { - public [STATUS] [ContainingClassKey=C] constructor(): R|C| { - super() - } - - } - -AnnotationType: -FILE: superTypesLoop.kt - public? open [TYPES] class resolveMe : R|C| { - public? [TYPES] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { - super() - } - - } - public? open [RAW_FIR] class A : /B> { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { - super() - } - - } - public? open [RAW_FIR] class B : /C> { - public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { - super() - } - - } - public? open [SUPER_TYPES] class C : /A> { - public? [SUPER_TYPES] [ContainingClassKey=C] constructor(): R|C| { - super() - } - - } - -AnnotationsArguments: -FILE: superTypesLoop.kt - public open [ARGUMENTS_OF_ANNOTATIONS] class resolveMe : R|C| { - public [ARGUMENTS_OF_ANNOTATIONS] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { - super() - } - - } - public? open [RAW_FIR] class A : /B> { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { - super() - } - - } - public? open [RAW_FIR] class B : /C> { - public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { - super() - } - - } - public open [TYPES] class C : /A> { - public [TYPES] [ContainingClassKey=C] constructor(): R|C| { - super() - } - - } - -ClassSuperTypes: -FILE: superTypesLoop.kt - public? open [SUPER_TYPES] class resolveMe : R|C| { - public? [SUPER_TYPES] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { - super() - } - - } - public? open [RAW_FIR] class A : /B> { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { - super() - } - - } - public? open [RAW_FIR] class B : /C> { - public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { - super() - } - - } - public? open [RAW_FIR] class C : /A> { - public? [RAW_FIR] [ContainingClassKey=C] constructor(): R|C| { - super() - } - - } - -DeclarationStatus: -FILE: superTypesLoop.kt - public open [STATUS] class resolveMe : R|C| { - public [STATUS] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { - super() - } - - } - public? open [RAW_FIR] class A : /B> { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { - super() - } - - } - public? open [RAW_FIR] class B : /C> { - public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { - super() - } - - } - public open [TYPES] class C : /A> { - public [TYPES] [ContainingClassKey=C] constructor(): R|C| { - super() - } - - } - -ValueParametersTypes: -FILE: superTypesLoop.kt - public? open [TYPES] class resolveMe : R|C| { - public? [TYPES] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { - super() - } - - } - public? open [RAW_FIR] class A : /B> { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { - super() - } - - } - public? open [RAW_FIR] class B : /C> { - public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { - super() - } - - } - public? open [SUPER_TYPES] class C : /A> { - public? [SUPER_TYPES] [ContainingClassKey=C] constructor(): R|C| { - super() - } - - } - -TypeParametersTypes: -FILE: superTypesLoop.kt - public? open [TYPES] class resolveMe : R|C| { - public? [TYPES] [ContainingClassKey=resolveMe] constructor(): R|resolveMe| { - super() - } - - } - public? open [RAW_FIR] class A : /B> { - public? [RAW_FIR] [ContainingClassKey=A] constructor(): R|A| { - super() - } - - } - public? open [RAW_FIR] class B : /C> { - public? [RAW_FIR] [ContainingClassKey=B] constructor(): R|B| { - super() - } - - } - public? open [SUPER_TYPES] class C : /A> { - public? [SUPER_TYPES] [ContainingClassKey=C] constructor(): R|C| { - super() - } - - } - FILE RAW TO BODY: FILE: superTypesLoop.kt public open [BODY_RESOLVE] class resolveMe : R|C| { diff --git a/analysis/low-level-api-fir/testdata/lazyResolve/topLevelFunctions.txt b/analysis/low-level-api-fir/testdata/lazyResolve/topLevelFunctions.txt index 8e6cabdd4bf..9831fa7f438 100644 --- a/analysis/low-level-api-fir/testdata/lazyResolve/topLevelFunctions.txt +++ b/analysis/low-level-api-fir/testdata/lazyResolve/topLevelFunctions.txt @@ -1,211 +1,63 @@ + RAW_FIR: FILE: topLevelFunctions.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } + public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun functionWithLazyBody(): String { LAZY_BLOCK } IMPORTS: FILE: topLevelFunctions.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } + public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun functionWithLazyBody(): String { LAZY_BLOCK } SUPER_TYPES: FILE: topLevelFunctions.kt - public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } + public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun functionWithLazyBody(): String { LAZY_BLOCK } TYPES: FILE: topLevelFunctions.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun functionWithLazyBody(): String { LAZY_BLOCK } STATUS: FILE: topLevelFunctions.kt - public final [STATUS] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } + public final [STATUS] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun functionWithLazyBody(): String { LAZY_BLOCK } ARGUMENTS_OF_ANNOTATIONS: FILE: topLevelFunctions.kt - public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } + public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun functionWithLazyBody(): String { LAZY_BLOCK } CONTRACTS: FILE: topLevelFunctions.kt public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun functionWithLazyBody(): String { LAZY_BLOCK } IMPLICIT_TYPES_BODY_RESOLVE: FILE: topLevelFunctions.kt public final [IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun functionWithLazyBody(): String { LAZY_BLOCK } BODY_RESOLVE: FILE: topLevelFunctions.kt public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/functionWithLazyBody|()) } - public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { - } - public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { - ^functionWithLazyBody String(42) - } - -NoResolve: -FILE: topLevelFunctions.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } - -BodyResolveWithChildren: -FILE: topLevelFunctions.kt - public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { - R|/receive|(R|/functionWithLazyBody|()) - } - public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { - } - public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { - ^functionWithLazyBody String(42) - } - -CallableBodyResolve: -FILE: topLevelFunctions.kt - public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { - R|/receive|(R|/functionWithLazyBody|()) - } - public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { - } - public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { - ^functionWithLazyBody String(42) - } - -CallableReturnType: -FILE: topLevelFunctions.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } - -AnnotationType: -FILE: topLevelFunctions.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } - -AnnotationsArguments: -FILE: topLevelFunctions.kt - public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } - -CallableContracts: -FILE: topLevelFunctions.kt - public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } - -DeclarationStatus: -FILE: topLevelFunctions.kt - public final [STATUS] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } - -ValueParametersTypes: -FILE: topLevelFunctions.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } - -TypeParametersTypes: -FILE: topLevelFunctions.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { LAZY_BLOCK } + public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { LAZY_BLOCK } FILE RAW TO BODY: FILE: topLevelFunctions.kt diff --git a/analysis/low-level-api-fir/testdata/lazyResolve/topLevelFunctionsWithExpressionBodyAndExplicitType.txt b/analysis/low-level-api-fir/testdata/lazyResolve/topLevelFunctionsWithExpressionBodyAndExplicitType.txt index c4bae912377..1e82b5915e7 100644 --- a/analysis/low-level-api-fir/testdata/lazyResolve/topLevelFunctionsWithExpressionBodyAndExplicitType.txt +++ b/analysis/low-level-api-fir/testdata/lazyResolve/topLevelFunctionsWithExpressionBodyAndExplicitType.txt @@ -1,211 +1,63 @@ + RAW_FIR: FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } + public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun functionWithLazyBody(): String { LAZY_BLOCK } IMPORTS: FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } + public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun functionWithLazyBody(): String { LAZY_BLOCK } SUPER_TYPES: FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } + public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun functionWithLazyBody(): String { LAZY_BLOCK } TYPES: FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun functionWithLazyBody(): String { LAZY_BLOCK } STATUS: FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public final [STATUS] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } + public final [STATUS] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun functionWithLazyBody(): String { LAZY_BLOCK } ARGUMENTS_OF_ANNOTATIONS: FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } + public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun functionWithLazyBody(): String { LAZY_BLOCK } CONTRACTS: FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun functionWithLazyBody(): String { LAZY_BLOCK } IMPLICIT_TYPES_BODY_RESOLVE: FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt public final [IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun functionWithLazyBody(): String { LAZY_BLOCK } BODY_RESOLVE: FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/functionWithLazyBody|()) } - public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { - } - public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { - ^functionWithLazyBody String(42) - } - -NoResolve: -FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } - -BodyResolveWithChildren: -FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { - R|/receive|(R|/functionWithLazyBody|()) - } - public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { - } - public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { - ^functionWithLazyBody String(42) - } - -CallableBodyResolve: -FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { - R|/receive|(R|/functionWithLazyBody|()) - } - public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { - } - public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { - ^functionWithLazyBody String(42) - } - -CallableReturnType: -FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } - -AnnotationType: -FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } - -AnnotationsArguments: -FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } - -CallableContracts: -FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } - -DeclarationStatus: -FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public final [STATUS] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } - -ValueParametersTypes: -FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } - -TypeParametersTypes: -FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): String { - ^functionWithLazyBody String(42) - } + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { LAZY_BLOCK } + public final [STATUS] fun functionWithLazyBody(): R|kotlin/String| { LAZY_BLOCK } FILE RAW TO BODY: FILE: topLevelFunctionsWithExpressionBodyAndExplicitType.kt diff --git a/analysis/low-level-api-fir/testdata/lazyResolve/topLevelFunctionsWithImplicitType.txt b/analysis/low-level-api-fir/testdata/lazyResolve/topLevelFunctionsWithImplicitType.txt index 6fac314de17..0e5992858b2 100644 --- a/analysis/low-level-api-fir/testdata/lazyResolve/topLevelFunctionsWithImplicitType.txt +++ b/analysis/low-level-api-fir/testdata/lazyResolve/topLevelFunctionsWithImplicitType.txt @@ -1,212 +1,66 @@ + RAW_FIR: FILE: topLevelFunctionsWithImplicitType.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): { - ^functionWithLazyBody String(42) - } + public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun functionWithLazyBody(): { LAZY_BLOCK } IMPORTS: FILE: topLevelFunctionsWithImplicitType.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): { - ^functionWithLazyBody String(42) - } + public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun functionWithLazyBody(): { LAZY_BLOCK } SUPER_TYPES: FILE: topLevelFunctionsWithImplicitType.kt - public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): { - ^functionWithLazyBody String(42) - } + public? final? [SUPER_TYPES] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun functionWithLazyBody(): { LAZY_BLOCK } TYPES: FILE: topLevelFunctionsWithImplicitType.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): { - ^functionWithLazyBody String(42) - } + public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun functionWithLazyBody(): { LAZY_BLOCK } STATUS: FILE: topLevelFunctionsWithImplicitType.kt - public final [STATUS] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): { - ^functionWithLazyBody String(42) - } + public final [STATUS] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun functionWithLazyBody(): { LAZY_BLOCK } ARGUMENTS_OF_ANNOTATIONS: FILE: topLevelFunctionsWithImplicitType.kt - public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): { - ^functionWithLazyBody String(42) - } + public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun functionWithLazyBody(): { LAZY_BLOCK } CONTRACTS: FILE: topLevelFunctionsWithImplicitType.kt public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): { - ^functionWithLazyBody String(42) - } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun functionWithLazyBody(): { LAZY_BLOCK } IMPLICIT_TYPES_BODY_RESOLVE: FILE: topLevelFunctionsWithImplicitType.kt public final [IMPLICIT_TYPES_BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { receive#(functionWithLazyBody#()) } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): { - ^functionWithLazyBody String(42) - } + public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { LAZY_BLOCK } + public? final? [RAW_FIR] fun functionWithLazyBody(): { LAZY_BLOCK } BODY_RESOLVE: FILE: topLevelFunctionsWithImplicitType.kt public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { R|/receive|(R|/functionWithLazyBody|()) } - public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { - } + public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { LAZY_BLOCK } public final [IMPLICIT_TYPES_BODY_RESOLVE] fun functionWithLazyBody(): R|kotlin/String| { ^functionWithLazyBody String(42) } -NoResolve: -FILE: topLevelFunctionsWithImplicitType.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): { - ^functionWithLazyBody String(42) - } - -BodyResolveWithChildren: -FILE: topLevelFunctionsWithImplicitType.kt - public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { - R|/receive|(R|/functionWithLazyBody|()) - } - public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { - } - public final [IMPLICIT_TYPES_BODY_RESOLVE] fun functionWithLazyBody(): R|kotlin/String| { - ^functionWithLazyBody String(42) - } - -CallableBodyResolve: -FILE: topLevelFunctionsWithImplicitType.kt - public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { - R|/receive|(R|/functionWithLazyBody|()) - } - public final [STATUS] fun receive([RAW_FIR] value: R|kotlin/String|): R|kotlin/Unit| { - } - public final [IMPLICIT_TYPES_BODY_RESOLVE] fun functionWithLazyBody(): R|kotlin/String| { - ^functionWithLazyBody String(42) - } - -CallableReturnType: -FILE: topLevelFunctionsWithImplicitType.kt - public? final? [RAW_FIR] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): { - ^functionWithLazyBody String(42) - } - -AnnotationType: -FILE: topLevelFunctionsWithImplicitType.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): { - ^functionWithLazyBody String(42) - } - -AnnotationsArguments: -FILE: topLevelFunctionsWithImplicitType.kt - public final [ARGUMENTS_OF_ANNOTATIONS] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): { - ^functionWithLazyBody String(42) - } - -CallableContracts: -FILE: topLevelFunctionsWithImplicitType.kt - public final [CONTRACTS] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): { - ^functionWithLazyBody String(42) - } - -DeclarationStatus: -FILE: topLevelFunctionsWithImplicitType.kt - public final [STATUS] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): { - ^functionWithLazyBody String(42) - } - -ValueParametersTypes: -FILE: topLevelFunctionsWithImplicitType.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): { - ^functionWithLazyBody String(42) - } - -TypeParametersTypes: -FILE: topLevelFunctionsWithImplicitType.kt - public? final? [TYPES] fun resolveMe(): R|kotlin/Unit| { - receive#(functionWithLazyBody#()) - } - public? final? [RAW_FIR] fun receive([RAW_FIR] value: String): R|kotlin/Unit| { - } - public? final? [RAW_FIR] fun functionWithLazyBody(): { - ^functionWithLazyBody String(42) - } - FILE RAW TO BODY: FILE: topLevelFunctionsWithImplicitType.kt public final [BODY_RESOLVE] fun resolveMe(): R|kotlin/Unit| { diff --git a/analysis/low-level-api-fir/testdata/lazyResolve/typeParameterOfNonLocalFunction.txt b/analysis/low-level-api-fir/testdata/lazyResolve/typeParameterOfNonLocalFunction.txt index 677889fd040..0ead9cb0712 100644 --- a/analysis/low-level-api-fir/testdata/lazyResolve/typeParameterOfNonLocalFunction.txt +++ b/analysis/low-level-api-fir/testdata/lazyResolve/typeParameterOfNonLocalFunction.txt @@ -1,3 +1,4 @@ + RAW_FIR: FILE: typeParameterOfNonLocalFunction.kt public? final? [RAW_FIR] class X : R|kotlin/Any| { @@ -5,8 +6,7 @@ FILE: typeParameterOfNonLocalFunction.kt super() } - public? final? [RAW_FIR] fun ddd(): R|kotlin/Unit| { - } + public? final? [RAW_FIR] fun ddd(): R|kotlin/Unit| { LAZY_BLOCK } } @@ -17,8 +17,7 @@ FILE: typeParameterOfNonLocalFunction.kt super() } - public? final? [RAW_FIR] fun ddd(): R|kotlin/Unit| { - } + public? final? [RAW_FIR] fun ddd(): R|kotlin/Unit| { LAZY_BLOCK } } @@ -29,8 +28,7 @@ FILE: typeParameterOfNonLocalFunction.kt super() } - public? final? [SUPER_TYPES] fun ddd(): R|kotlin/Unit| { - } + public? final? [SUPER_TYPES] fun ddd(): R|kotlin/Unit| { LAZY_BLOCK } } @@ -41,8 +39,7 @@ FILE: typeParameterOfNonLocalFunction.kt super() } - public? final? [TYPES] fun ddd(): R|kotlin/Unit| { - } + public? final? [TYPES] fun ddd(): R|kotlin/Unit| { LAZY_BLOCK } } @@ -53,8 +50,7 @@ FILE: typeParameterOfNonLocalFunction.kt super() } - public final [STATUS] fun ddd(): R|kotlin/Unit| { - } + public final [STATUS] fun ddd(): R|kotlin/Unit| { LAZY_BLOCK } } @@ -65,8 +61,7 @@ FILE: typeParameterOfNonLocalFunction.kt super() } - public final [ARGUMENTS_OF_ANNOTATIONS] fun ddd(): R|kotlin/Unit| { - } + public final [ARGUMENTS_OF_ANNOTATIONS] fun ddd(): R|kotlin/Unit| { LAZY_BLOCK } } @@ -106,90 +101,6 @@ FILE: typeParameterOfNonLocalFunction.kt } -NoResolve: -FILE: typeParameterOfNonLocalFunction.kt - public? final? [RAW_FIR] class X : R|kotlin/Any| { - public? [RAW_FIR] [ContainingClassKey=X] constructor(): R|X| { - super() - } - - public? final? [RAW_FIR] fun ddd(): R|kotlin/Unit| { - } - - } - -BodyResolveWithChildren: -FILE: typeParameterOfNonLocalFunction.kt - public final [STATUS] class X : R|kotlin/Any| { - public [STATUS] [ContainingClassKey=X] constructor(): R|X| { - super() - } - - public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { - } - - } - -AnnotationType: -FILE: typeParameterOfNonLocalFunction.kt - public? final? [SUPER_TYPES] class X : R|kotlin/Any| { - public? [SUPER_TYPES] [ContainingClassKey=X] constructor(): R|X| { - super() - } - - public? final? [TYPES] fun ddd(): R|kotlin/Unit| { - } - - } - -AnnotationsArguments: -FILE: typeParameterOfNonLocalFunction.kt - public final [SUPER_TYPES] class X : R|kotlin/Any| { - public? [SUPER_TYPES] [ContainingClassKey=X] constructor(): R|X| { - super() - } - - public final [ARGUMENTS_OF_ANNOTATIONS] fun ddd(): R|kotlin/Unit| { - } - - } - -DeclarationStatus: -FILE: typeParameterOfNonLocalFunction.kt - public final [SUPER_TYPES] class X : R|kotlin/Any| { - public? [SUPER_TYPES] [ContainingClassKey=X] constructor(): R|X| { - super() - } - - public final [STATUS] fun ddd(): R|kotlin/Unit| { - } - - } - -ValueParametersTypes: -FILE: typeParameterOfNonLocalFunction.kt - public? final? [SUPER_TYPES] class X : R|kotlin/Any| { - public? [SUPER_TYPES] [ContainingClassKey=X] constructor(): R|X| { - super() - } - - public? final? [TYPES] fun ddd(): R|kotlin/Unit| { - } - - } - -TypeParametersTypes: -FILE: typeParameterOfNonLocalFunction.kt - public? final? [SUPER_TYPES] class X : R|kotlin/Any| { - public? [SUPER_TYPES] [ContainingClassKey=X] constructor(): R|X| { - super() - } - - public? final? [TYPES] fun ddd(): R|kotlin/Unit| { - } - - } - FILE RAW TO BODY: FILE: typeParameterOfNonLocalFunction.kt public final [BODY_RESOLVE] class X : R|kotlin/Any| { diff --git a/analysis/low-level-api-fir/testdata/lazyResolve/typeParameterOfTopFunction.txt b/analysis/low-level-api-fir/testdata/lazyResolve/typeParameterOfTopFunction.txt index e39ebb59170..e7d5da1b8af 100644 --- a/analysis/low-level-api-fir/testdata/lazyResolve/typeParameterOfTopFunction.txt +++ b/analysis/low-level-api-fir/testdata/lazyResolve/typeParameterOfTopFunction.txt @@ -1,32 +1,27 @@ + RAW_FIR: FILE: typeParameterOfTopFunction.kt - public? final? [RAW_FIR] fun ddd(): R|kotlin/Unit| { - } + public? final? [RAW_FIR] fun ddd(): R|kotlin/Unit| { LAZY_BLOCK } IMPORTS: FILE: typeParameterOfTopFunction.kt - public? final? [RAW_FIR] fun ddd(): R|kotlin/Unit| { - } + public? final? [RAW_FIR] fun ddd(): R|kotlin/Unit| { LAZY_BLOCK } SUPER_TYPES: FILE: typeParameterOfTopFunction.kt - public? final? [SUPER_TYPES] fun ddd(): R|kotlin/Unit| { - } + public? final? [SUPER_TYPES] fun ddd(): R|kotlin/Unit| { LAZY_BLOCK } TYPES: FILE: typeParameterOfTopFunction.kt - public? final? [TYPES] fun ddd(): R|kotlin/Unit| { - } + public? final? [TYPES] fun ddd(): R|kotlin/Unit| { LAZY_BLOCK } STATUS: FILE: typeParameterOfTopFunction.kt - public final [STATUS] fun ddd(): R|kotlin/Unit| { - } + public final [STATUS] fun ddd(): R|kotlin/Unit| { LAZY_BLOCK } ARGUMENTS_OF_ANNOTATIONS: FILE: typeParameterOfTopFunction.kt - public final [ARGUMENTS_OF_ANNOTATIONS] fun ddd(): R|kotlin/Unit| { - } + public final [ARGUMENTS_OF_ANNOTATIONS] fun ddd(): R|kotlin/Unit| { LAZY_BLOCK } CONTRACTS: FILE: typeParameterOfTopFunction.kt @@ -43,41 +38,6 @@ FILE: typeParameterOfTopFunction.kt public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { } -NoResolve: -FILE: typeParameterOfTopFunction.kt - public? final? [RAW_FIR] fun ddd(): R|kotlin/Unit| { - } - -BodyResolveWithChildren: -FILE: typeParameterOfTopFunction.kt - public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { - } - -AnnotationType: -FILE: typeParameterOfTopFunction.kt - public? final? [TYPES] fun ddd(): R|kotlin/Unit| { - } - -AnnotationsArguments: -FILE: typeParameterOfTopFunction.kt - public final [ARGUMENTS_OF_ANNOTATIONS] fun ddd(): R|kotlin/Unit| { - } - -DeclarationStatus: -FILE: typeParameterOfTopFunction.kt - public final [STATUS] fun ddd(): R|kotlin/Unit| { - } - -ValueParametersTypes: -FILE: typeParameterOfTopFunction.kt - public? final? [TYPES] fun ddd(): R|kotlin/Unit| { - } - -TypeParametersTypes: -FILE: typeParameterOfTopFunction.kt - public? final? [TYPES] fun ddd(): R|kotlin/Unit| { - } - FILE RAW TO BODY: FILE: typeParameterOfTopFunction.kt public final [BODY_RESOLVE] fun ddd(): R|kotlin/Unit| { diff --git a/analysis/low-level-api-fir/testdata/lazyResolve/typeParameterOfTopSetter.txt b/analysis/low-level-api-fir/testdata/lazyResolve/typeParameterOfTopSetter.txt index 056cd15678d..c9ecba949b5 100644 --- a/analysis/low-level-api-fir/testdata/lazyResolve/typeParameterOfTopSetter.txt +++ b/analysis/low-level-api-fir/testdata/lazyResolve/typeParameterOfTopSetter.txt @@ -1,50 +1,39 @@ + RAW_FIR: FILE: typeParameterOfTopSetter.kt - public? final? [RAW_FIR] var x: Int = IntegerLiteral(2) + public? final? [RAW_FIR] var x: Int = LAZY_EXPRESSION [TYPES] public? get(): Int - [RAW_FIR] public? set([RAW_FIR] resolveMe: Int): R|kotlin/Unit| { - ^ Unit# - } + [RAW_FIR] public? set([RAW_FIR] resolveMe: Int): R|kotlin/Unit| { LAZY_BLOCK } IMPORTS: FILE: typeParameterOfTopSetter.kt - public? final? [RAW_FIR] var x: Int = IntegerLiteral(2) + public? final? [RAW_FIR] var x: Int = LAZY_EXPRESSION [TYPES] public? get(): Int - [RAW_FIR] public? set([RAW_FIR] resolveMe: Int): R|kotlin/Unit| { - ^ Unit# - } + [RAW_FIR] public? set([RAW_FIR] resolveMe: Int): R|kotlin/Unit| { LAZY_BLOCK } SUPER_TYPES: FILE: typeParameterOfTopSetter.kt - public? final? [SUPER_TYPES] var x: Int = IntegerLiteral(2) + public? final? [SUPER_TYPES] var x: Int = LAZY_EXPRESSION [TYPES] public? get(): Int - [SUPER_TYPES] public? set([RAW_FIR] resolveMe: Int): R|kotlin/Unit| { - ^ Unit# - } + [SUPER_TYPES] public? set([RAW_FIR] resolveMe: Int): R|kotlin/Unit| { LAZY_BLOCK } TYPES: FILE: typeParameterOfTopSetter.kt - public? final? [TYPES] var x: R|kotlin/Int| = IntegerLiteral(2) + public? final? [TYPES] var x: R|kotlin/Int| = LAZY_EXPRESSION [TYPES] public? get(): R|kotlin/Int| - [TYPES] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { - ^ Unit# - } + [TYPES] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { LAZY_BLOCK } STATUS: FILE: typeParameterOfTopSetter.kt - public final [STATUS] var x: R|kotlin/Int| = IntegerLiteral(2) + public final [STATUS] var x: R|kotlin/Int| = LAZY_EXPRESSION [BODY_RESOLVE] public get(): R|kotlin/Int| - [STATUS] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { - ^ Unit# - } + [STATUS] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { LAZY_BLOCK } ARGUMENTS_OF_ANNOTATIONS: FILE: typeParameterOfTopSetter.kt - public final [ARGUMENTS_OF_ANNOTATIONS] var x: R|kotlin/Int| = IntegerLiteral(2) + public final [ARGUMENTS_OF_ANNOTATIONS] var x: R|kotlin/Int| = LAZY_EXPRESSION [BODY_RESOLVE] public get(): R|kotlin/Int| - [ARGUMENTS_OF_ANNOTATIONS] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { - ^ Unit# - } + [ARGUMENTS_OF_ANNOTATIONS] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { LAZY_BLOCK } CONTRACTS: FILE: typeParameterOfTopSetter.kt @@ -70,86 +59,6 @@ FILE: typeParameterOfTopSetter.kt ^ Q|kotlin/Unit| } -NoResolve: -FILE: typeParameterOfTopSetter.kt - public? final? [RAW_FIR] var x: Int = IntegerLiteral(2) - [TYPES] public? get(): Int - [RAW_FIR] public? set([RAW_FIR] resolveMe: Int): R|kotlin/Unit| { - ^ Unit# - } - -BodyResolveWithChildren: -FILE: typeParameterOfTopSetter.kt - public final [BODY_RESOLVE] var x: R|kotlin/Int| = Int(2) - [BODY_RESOLVE] public get(): R|kotlin/Int| - [BODY_RESOLVE] public set([BODY_RESOLVE] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { - ^ Q|kotlin/Unit| - } - -CallableBodyResolve: -FILE: typeParameterOfTopSetter.kt - public final [BODY_RESOLVE] var x: R|kotlin/Int| = Int(2) - [BODY_RESOLVE] public get(): R|kotlin/Int| - [BODY_RESOLVE] public set([BODY_RESOLVE] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { - ^ Q|kotlin/Unit| - } - -CallableReturnType: -FILE: typeParameterOfTopSetter.kt - public? final? [TYPES] var x: R|kotlin/Int| = IntegerLiteral(2) - [TYPES] public? get(): R|kotlin/Int| - [TYPES] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { - ^ Unit# - } - -AnnotationType: -FILE: typeParameterOfTopSetter.kt - public? final? [TYPES] var x: R|kotlin/Int| = IntegerLiteral(2) - [TYPES] public? get(): R|kotlin/Int| - [TYPES] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { - ^ Unit# - } - -AnnotationsArguments: -FILE: typeParameterOfTopSetter.kt - public final [ARGUMENTS_OF_ANNOTATIONS] var x: R|kotlin/Int| = IntegerLiteral(2) - [BODY_RESOLVE] public get(): R|kotlin/Int| - [ARGUMENTS_OF_ANNOTATIONS] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { - ^ Unit# - } - -CallableContracts: -FILE: typeParameterOfTopSetter.kt - public final [CONTRACTS] var x: R|kotlin/Int| = IntegerLiteral(2) - [BODY_RESOLVE] public get(): R|kotlin/Int| - [CONTRACTS] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { - ^ Unit# - } - -DeclarationStatus: -FILE: typeParameterOfTopSetter.kt - public final [STATUS] var x: R|kotlin/Int| = IntegerLiteral(2) - [BODY_RESOLVE] public get(): R|kotlin/Int| - [STATUS] public set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { - ^ Unit# - } - -ValueParametersTypes: -FILE: typeParameterOfTopSetter.kt - public? final? [TYPES] var x: R|kotlin/Int| = IntegerLiteral(2) - [TYPES] public? get(): R|kotlin/Int| - [TYPES] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { - ^ Unit# - } - -TypeParametersTypes: -FILE: typeParameterOfTopSetter.kt - public? final? [TYPES] var x: R|kotlin/Int| = IntegerLiteral(2) - [TYPES] public? get(): R|kotlin/Int| - [TYPES] public? set([RAW_FIR] resolveMe: R|kotlin/Int|): R|kotlin/Unit| { - ^ Unit# - } - FILE RAW TO BODY: FILE: typeParameterOfTopSetter.kt public final [BODY_RESOLVE] var x: R|kotlin/Int| = Int(2) diff --git a/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/DeclarationsConverter.kt b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/DeclarationsConverter.kt index 925cbbdff41..c45f85112da 100644 --- a/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/DeclarationsConverter.kt +++ b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/DeclarationsConverter.kt @@ -453,7 +453,7 @@ class DeclarationsConverter( typeParameterList?.let { firTypeParameters += convertTypeParameters(it, typeConstraints, classSymbol) } - withCapturedTypeParameters(status.isInner || isLocal, firTypeParameters) { + withCapturedTypeParameters(status.isInner || isLocal, classNode.toFirSourceElement(), firTypeParameters) { var delegatedFieldsMap: Map? = null buildRegularClass { source = classNode.toFirSourceElement() @@ -1141,7 +1141,7 @@ class DeclarationsConverter( this.isLocal = false receiverTypeRef = receiverType dispatchReceiverType = currentDispatchReceiverType() - withCapturedTypeParameters(true, firTypeParameters) { + withCapturedTypeParameters(true, propertySource, firTypeParameters) { typeParameters += firTypeParameters val delegateBuilder = delegateExpression?.let { @@ -1619,7 +1619,7 @@ class DeclarationsConverter( listOf() } - withCapturedTypeParameters(true, actualTypeParameters) { + withCapturedTypeParameters(true, functionSource, actualTypeParameters) { valueParametersList?.let { list -> valueParameters += convertValueParameters( list, diff --git a/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt b/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt index a8dca1fcf93..91df87d2818 100644 --- a/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt +++ b/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt @@ -534,7 +534,10 @@ open class RawFirBuilder( this.name = name symbol = FirValueParameterSymbol(name) defaultValue = if (hasDefaultValue()) { - { this@toFirValueParameter.defaultValue }.toFirExpression("Should have default value") + disabledLazyMode { + // TODO build lazy initializers here + { this@toFirValueParameter.defaultValue }.toFirExpression("Should have default value") + } } else null isCrossinline = hasModifier(CROSSINLINE_KEYWORD) isNoinline = hasModifier(NOINLINE_KEYWORD) @@ -726,7 +729,7 @@ open class RawFirBuilder( val argumentList = buildArgumentList { source = valueArgumentList?.toFirSourceElement() for (argument in valueArguments) { - val argumentExpression = argument.toFirExpression() + val argumentExpression = disabledLazyMode { argument.toFirExpression() } arguments += when (argument) { is KtLambdaArgument -> buildLambdaArgumentExpression { source = argument.toFirSourceElement() @@ -1044,7 +1047,7 @@ open class RawFirBuilder( isExternal = classOrObject.hasModifier(EXTERNAL_KEYWORD) } - withCapturedTypeParameters(status.isInner || isLocal, listOf()) { + withCapturedTypeParameters(status.isInner || isLocal, classOrObject.toFirSourceElement(), listOf()) { var delegatedFieldsMap: Map? buildRegularClass { source = classOrObject.toFirSourceElement() @@ -1281,7 +1284,7 @@ open class RawFirBuilder( this.typeParameters else listOf() - withCapturedTypeParameters(true, actualTypeParameters) { + withCapturedTypeParameters(true, functionSource, actualTypeParameters) { val outerContractDescription = function.obtainContractDescription() val bodyWithContractDescription = function.buildFirBody() this.body = bodyWithContractDescription.first @@ -1569,7 +1572,7 @@ open class RawFirBuilder( symbol = FirPropertySymbol(callableIdForName(propertyName)) dispatchReceiverType = currentDispatchReceiverType() extractTypeParametersTo(this, symbol) - withCapturedTypeParameters(true, this.typeParameters) { + withCapturedTypeParameters(true, propertySource, this.typeParameters) { backingField = this@toFirProperty.fieldDeclaration.toFirBackingField( this@toFirProperty, propertySymbol = symbol, diff --git a/compiler/fir/raw-fir/raw-fir.common/src/org/jetbrains/kotlin/fir/builder/BaseFirBuilder.kt b/compiler/fir/raw-fir/raw-fir.common/src/org/jetbrains/kotlin/fir/builder/BaseFirBuilder.kt index 0fb4448ff81..3a85166ff64 100644 --- a/compiler/fir/raw-fir/raw-fir.common/src/org/jetbrains/kotlin/fir/builder/BaseFirBuilder.kt +++ b/compiler/fir/raw-fir/raw-fir.common/src/org/jetbrains/kotlin/fir/builder/BaseFirBuilder.kt @@ -102,8 +102,13 @@ abstract class BaseFirBuilder(val baseSession: FirSession, val context: Conte context.dispatchReceiverTypesStack.add(selfType.type as ConeClassLikeType) } - inline fun withCapturedTypeParameters(status: Boolean, currentFirTypeParameters: List, block: () -> T): T { - context.pushFirTypeParameters(status, currentFirTypeParameters) + protected inline fun withCapturedTypeParameters( + status: Boolean, + declarationSource: KtSourceElement? = null, + currentFirTypeParameters: List, + block: () -> T + ): T { + addCapturedTypeParameters(status, declarationSource, currentFirTypeParameters) return try { block() } finally { @@ -111,6 +116,14 @@ abstract class BaseFirBuilder(val baseSession: FirSession, val context: Conte } } + protected open fun addCapturedTypeParameters( + status: Boolean, + declarationSource: KtSourceElement?, + currentFirTypeParameters: List + ) { + context.pushFirTypeParameters(status, currentFirTypeParameters) + } + fun callableIdForName(name: Name) = when { context.className.shortNameOrSpecial() == SpecialNames.ANONYMOUS -> CallableId(ANONYMOUS_CLASS_ID, name)