From 0b253dc815e356995b7be19cf942d69557778a58 Mon Sep 17 00:00:00 2001 From: Dmitrii Gridin Date: Thu, 16 Nov 2023 17:51:16 +0100 Subject: [PATCH] [FIR] resolve delegate field return type in correct scope We should resolve it in the same way as delegate constructor call to avoid access to nested class scopes ^KT-63522 Fixed ^KT-63042 --- .../fir/transformers/LLFirTypeLazyResolver.kt | 54 +++++---- ...atedFieldNestedNameClashAndAnnotations.txt | 6 +- ...eldNestedNameClashAndAnnotationsScript.txt | 7 +- ...NameClashWithNestedTypesAndAnnotations.txt | 6 +- ...ashWithNestedTypesAndAnnotationsScript.txt | 7 +- .../delegatedFieldNestedNameClash.txt | 28 ++--- ...atedFieldNestedNameClashAndAnnotations.txt | 28 ++--- ...eldNestedNameClashAndAnnotationsScript.txt | 29 ++--- .../delegatedFieldNestedNameClashScript.txt | 29 ++--- ...tedFieldNestedNameClashWithNestedTypes.txt | 28 ++--- ...NameClashWithNestedTypesAndAnnotations.txt | 28 ++--- ...ashWithNestedTypesAndAnnotationsScript.txt | 29 ++--- ...ldNestedNameClashWithNestedTypesScript.txt | 29 ++--- ...edNameClashAndAnnotationsAsConstructor.txt | 26 ++--- ...ClashAndAnnotationsAsConstructorScript.txt | 27 ++--- ...NestedTypesAndAnnotationsAsConstructor.txt | 26 ++--- ...TypesAndAnnotationsAsConstructorScript.txt | 27 ++--- .../transformers/FirTypeResolveTransformer.kt | 17 ++- .../box/delegation/nestedNameClash.fir.ir.txt | 109 ++++++++++++++++++ .../codegen/box/delegation/nestedNameClash.kt | 1 - .../delegation/nestedNameClash2.fir.ir.txt | 13 ++- .../box/delegation/nestedNameClash2.kt | 1 - .../clashes/nestedNameClash.fir.txt | 4 +- .../clashes/nestedNameClash2.fir.txt | 4 +- .../clashes/nestedNameClash3.fir.kt | 15 --- .../clashes/nestedNameClash3.fir.txt | 6 +- .../delegation/clashes/nestedNameClash3.kt | 1 + .../nestedNameClashAndAnnotations.fir.txt | 2 +- ...edNameClashAndAnnotations.reversed.fir.txt | 2 +- .../scopes/classHeader/classParents.fir.kt | 2 +- .../scopes/classHeader/objectParents.fir.kt | 2 +- 31 files changed, 362 insertions(+), 231 deletions(-) create mode 100644 compiler/testData/codegen/box/delegation/nestedNameClash.fir.ir.txt delete mode 100644 compiler/testData/diagnostics/tests/delegation/clashes/nestedNameClash3.fir.kt diff --git a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/LLFirTypeLazyResolver.kt b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/LLFirTypeLazyResolver.kt index f621d027ceb..35da80ab230 100644 --- a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/LLFirTypeLazyResolver.kt +++ b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/LLFirTypeLazyResolver.kt @@ -132,32 +132,18 @@ private class LLFirTypeTargetResolver( when (target) { is FirConstructor -> { // ConstructedTypeRef should be resolved only with type parameters, but not with nested classes and classes from supertypes - val scopesBeforeContainingClass = transformer.scopesBefore - ?: errorWithFirSpecificEntries("The containing class scope is not found", fir = target) - - val staticScopesBeforeContainingClass = transformer.staticScopesBefore - ?: errorWithFirSpecificEntries("The containing class static scope is not found", fir = target) - - @OptIn(PrivateForInline::class) - transformer.withScopeCleanup { - val clazz = transformer.classDeclarationsStack.last() - if (!transformer.removeOuterTypeParameterScope(clazz)) { - transformer.scopes = scopesBeforeContainingClass - } else { - transformer.scopes = staticScopesBeforeContainingClass - transformer.addTypeParametersScope(clazz) - } - - transformer.transformDelegatedConstructorCall(target) - } - - target.accept(transformer, null) + resolveOutsideClassBody(target, transformer::transformDelegatedConstructorCall) } is FirScript -> resolveScriptTypes(target) is FirDanglingModifierList, is FirFileAnnotationsContainer, is FirCallableDeclaration, is FirTypeAlias, is FirAnonymousInitializer, -> { - target.accept(transformer, null) + if (target is FirField && target.origin == FirDeclarationOrigin.Synthetic.DelegateField) { + // delegated field should be resolved in the same context as super types + resolveOutsideClassBody(target, transformer::transformDelegateField) + } else { + target.accept(transformer, null) + } } is FirRegularClass -> resolveClassTypes(target) @@ -167,6 +153,32 @@ private class LLFirTypeTargetResolver( } } + private inline fun resolveOutsideClassBody( + target: T, + crossinline actionOutsideClassBody: (T) -> Unit, + ) { + val scopesBeforeContainingClass = transformer.scopesBefore + ?: errorWithFirSpecificEntries("The containing class scope is not found", fir = target) + + val staticScopesBeforeContainingClass = transformer.staticScopesBefore + ?: errorWithFirSpecificEntries("The containing class static scope is not found", fir = target) + + @OptIn(PrivateForInline::class) + transformer.withScopeCleanup { + val clazz = transformer.classDeclarationsStack.last() + if (!transformer.removeOuterTypeParameterScope(clazz)) { + transformer.scopes = scopesBeforeContainingClass + } else { + transformer.scopes = staticScopesBeforeContainingClass + transformer.addTypeParametersScope(clazz) + } + + actionOutsideClassBody(target) + } + + target.accept(transformer, null) + } + private fun resolveScriptTypes(firScript: FirScript) { firScript.annotations.forEach { it.accept(transformer, null) } firScript.contextReceivers.forEach { it.accept(transformer, null) } diff --git a/analysis/low-level-api-fir/testData/lazyResolve/classes/delegatedFieldNestedNameClashAndAnnotations.txt b/analysis/low-level-api-fir/testData/lazyResolve/classes/delegatedFieldNestedNameClashAndAnnotations.txt index f6461627f21..46ae4e3feee 100644 --- a/analysis/low-level-api-fir/testData/lazyResolve/classes/delegatedFieldNestedNameClashAndAnnotations.txt +++ b/analysis/low-level-api-fir/testData/lazyResolve/classes/delegatedFieldNestedNameClashAndAnnotations.txt @@ -539,12 +539,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashAndAnnotations.kt super() } - private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(R|second/outer|)) second/MyClass.Base| = R|/prop| + private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(R|second/outer|)) second/Base| = R|/prop| public final [ResolvedTo(BODY_RESOLVE)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base| = R|/prop| public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -587,7 +587,7 @@ FILE: [ResolvedTo(BODY_RESOLVE)] delegatedFieldNestedNameClashAndAnnotations.kt super() } - private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(R|second/outer|)) second/MyClass.Base| = R|/prop| + private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(R|second/outer|)) second/Base| = R|/prop| public final [ResolvedTo(BODY_RESOLVE)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base| = R|/prop| public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base| diff --git a/analysis/low-level-api-fir/testData/lazyResolve/classes/delegatedFieldNestedNameClashAndAnnotationsScript.txt b/analysis/low-level-api-fir/testData/lazyResolve/classes/delegatedFieldNestedNameClashAndAnnotationsScript.txt index 97e7ed0f9d9..7395bf19686 100644 --- a/analysis/low-level-api-fir/testData/lazyResolve/classes/delegatedFieldNestedNameClashAndAnnotationsScript.txt +++ b/analysis/low-level-api-fir/testData/lazyResolve/classes/delegatedFieldNestedNameClashAndAnnotationsScript.txt @@ -646,12 +646,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashAndAnnotationsScript.kt super() } - private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(R|second/outer|)) second/MyClass.Base| = R|/prop| + private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(R|second/outer|)) second/Base| = R|/prop| public final [ResolvedTo(BODY_RESOLVE)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base| = R|/prop| public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -703,7 +703,7 @@ FILE: [ResolvedTo(BODY_RESOLVE)] delegatedFieldNestedNameClashAndAnnotationsScri super() } - private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(R|second/outer|)) second/MyClass.Base| = R|/prop| + private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(R|second/outer|)) second/Base| = R|/prop| public final [ResolvedTo(BODY_RESOLVE)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base| = R|/prop| public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base| @@ -725,3 +725,4 @@ FILE: [ResolvedTo(BODY_RESOLVE)] delegatedFieldNestedNameClashAndAnnotationsScri } } + diff --git a/analysis/low-level-api-fir/testData/lazyResolve/classes/delegatedFieldNestedNameClashWithNestedTypesAndAnnotations.txt b/analysis/low-level-api-fir/testData/lazyResolve/classes/delegatedFieldNestedNameClashWithNestedTypesAndAnnotations.txt index e46aae04b7f..91d550a8fbe 100644 --- a/analysis/low-level-api-fir/testData/lazyResolve/classes/delegatedFieldNestedNameClashWithNestedTypesAndAnnotations.txt +++ b/analysis/low-level-api-fir/testData/lazyResolve/classes/delegatedFieldNestedNameClashWithNestedTypesAndAnnotations.txt @@ -539,12 +539,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesAndAnnot super() } - private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(3).R|kotlin/Int.plus|(R|second/outer|)) second/MyClass.Base<@R|second/Anno|(i = Int(4).R|kotlin/Int.plus|(R|second/outer|)) second/Base<@R|second/Anno|(i = Int(5).R|kotlin/Int.plus|(R|second/outer|)) kotlin/Int>>| = R|/prop| + private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(3).R|kotlin/Int.plus|(R|second/outer|)) second/Base<@R|second/Anno|(i = Int(4).R|kotlin/Int.plus|(R|second/outer|)) second/Base<@R|second/Anno|(i = Int(5).R|kotlin/Int.plus|(R|second/outer|)) kotlin/Int>>| = R|/prop| public final [ResolvedTo(BODY_RESOLVE)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) kotlin/Int>>| = R|/prop| public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) kotlin/Int>>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -587,7 +587,7 @@ FILE: [ResolvedTo(BODY_RESOLVE)] delegatedFieldNestedNameClashWithNestedTypesAnd super() } - private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(3).R|kotlin/Int.plus|(R|second/outer|)) second/MyClass.Base<@R|second/Anno|(i = Int(4).R|kotlin/Int.plus|(R|second/outer|)) second/Base<@R|second/Anno|(i = Int(5).R|kotlin/Int.plus|(R|second/outer|)) kotlin/Int>>| = R|/prop| + private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(3).R|kotlin/Int.plus|(R|second/outer|)) second/Base<@R|second/Anno|(i = Int(4).R|kotlin/Int.plus|(R|second/outer|)) second/Base<@R|second/Anno|(i = Int(5).R|kotlin/Int.plus|(R|second/outer|)) kotlin/Int>>| = R|/prop| public final [ResolvedTo(BODY_RESOLVE)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) kotlin/Int>>| = R|/prop| public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) kotlin/Int>>| diff --git a/analysis/low-level-api-fir/testData/lazyResolve/classes/delegatedFieldNestedNameClashWithNestedTypesAndAnnotationsScript.txt b/analysis/low-level-api-fir/testData/lazyResolve/classes/delegatedFieldNestedNameClashWithNestedTypesAndAnnotationsScript.txt index 48fc1ea4294..b2f2392e7f3 100644 --- a/analysis/low-level-api-fir/testData/lazyResolve/classes/delegatedFieldNestedNameClashWithNestedTypesAndAnnotationsScript.txt +++ b/analysis/low-level-api-fir/testData/lazyResolve/classes/delegatedFieldNestedNameClashWithNestedTypesAndAnnotationsScript.txt @@ -646,12 +646,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesAndAnnot super() } - private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(3).R|kotlin/Int.plus|(R|second/outer|)) second/MyClass.Base<@R|second/Anno|(i = Int(4).R|kotlin/Int.plus|(R|second/outer|)) second/Base<@R|second/Anno|(i = Int(5).R|kotlin/Int.plus|(R|second/outer|)) kotlin/Int>>| = R|/prop| + private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(3).R|kotlin/Int.plus|(R|second/outer|)) second/Base<@R|second/Anno|(i = Int(4).R|kotlin/Int.plus|(R|second/outer|)) second/Base<@R|second/Anno|(i = Int(5).R|kotlin/Int.plus|(R|second/outer|)) kotlin/Int>>| = R|/prop| public final [ResolvedTo(BODY_RESOLVE)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) kotlin/Int>>| = R|/prop| public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) kotlin/Int>>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -703,7 +703,7 @@ FILE: [ResolvedTo(BODY_RESOLVE)] delegatedFieldNestedNameClashWithNestedTypesAnd super() } - private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(3).R|kotlin/Int.plus|(R|second/outer|)) second/MyClass.Base<@R|second/Anno|(i = Int(4).R|kotlin/Int.plus|(R|second/outer|)) second/Base<@R|second/Anno|(i = Int(5).R|kotlin/Int.plus|(R|second/outer|)) kotlin/Int>>| = R|/prop| + private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(3).R|kotlin/Int.plus|(R|second/outer|)) second/Base<@R|second/Anno|(i = Int(4).R|kotlin/Int.plus|(R|second/outer|)) second/Base<@R|second/Anno|(i = Int(5).R|kotlin/Int.plus|(R|second/outer|)) kotlin/Int>>| = R|/prop| public final [ResolvedTo(BODY_RESOLVE)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) kotlin/Int>>| = R|/prop| public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) kotlin/Int>>| @@ -725,3 +725,4 @@ FILE: [ResolvedTo(BODY_RESOLVE)] delegatedFieldNestedNameClashWithNestedTypesAnd } } + diff --git a/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClash.txt b/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClash.txt index 2c0d9668ed6..e05712ab4f3 100644 --- a/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClash.txt +++ b/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClash.txt @@ -114,7 +114,7 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClash.kt LAZY_super<> } - private final [ResolvedTo(TYPES)] field $$delegate_0: R|second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(TYPES)] field $$delegate_0: R|second/Base| = LAZY_EXPRESSION public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val prop: second.Base = R|/prop| public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyClass] get(): second.Base @@ -135,12 +135,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClash.kt LAZY_super<> } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } } @@ -156,12 +156,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClash.kt LAZY_super<> } - private final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] field $$delegate_0: R|second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] field $$delegate_0: R|second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } } @@ -177,12 +177,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClash.kt LAZY_super<> } - private final [ResolvedTo(CONTRACTS)] field $$delegate_0: R|second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(CONTRACTS)] field $$delegate_0: R|second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } } @@ -198,12 +198,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClash.kt LAZY_super<> } - private final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] field $$delegate_0: R|second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] field $$delegate_0: R|second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } } @@ -219,12 +219,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClash.kt LAZY_super<> } - private final [ResolvedTo(ANNOTATION_ARGUMENTS)] field $$delegate_0: R|second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(ANNOTATION_ARGUMENTS)] field $$delegate_0: R|second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } } @@ -240,12 +240,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClash.kt LAZY_super<> } - private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|second/MyClass.Base| = R|/prop| + private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|second/Base| = R|/prop| public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } } @@ -262,7 +262,7 @@ FILE: [ResolvedTo(BODY_RESOLVE)] delegatedFieldNestedNameClash.kt super() } - private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|second/MyClass.Base| = R|/prop| + private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|second/Base| = R|/prop| public final [ResolvedTo(BODY_RESOLVE)] [IsFromPrimaryConstructor=true] val prop: R|second/Base| = R|/prop| public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=MyClass] get(): R|second/Base| diff --git a/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClashAndAnnotations.txt b/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClashAndAnnotations.txt index e6881299462..b0f7b115e80 100644 --- a/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClashAndAnnotations.txt +++ b/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClashAndAnnotations.txt @@ -257,7 +257,7 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashAndAnnotations.kt LAZY_super<> } - private final [ResolvedTo(TYPES)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(TYPES)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/Base| = LAZY_EXPRESSION public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val prop: @Anno[Unresolved](LAZY_EXPRESSION) second.Base = R|/prop| public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyClass] get(): @Anno[Unresolved](LAZY_EXPRESSION) second.Base @@ -304,12 +304,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashAndAnnotations.kt LAZY_super<> } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } public? final? companion [ResolvedTo(RAW_FIR)] object Companion : R|kotlin/Any| { @@ -351,12 +351,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashAndAnnotations.kt LAZY_super<> } - private final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } public? final? companion [ResolvedTo(RAW_FIR)] object Companion : R|kotlin/Any| { @@ -398,12 +398,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashAndAnnotations.kt LAZY_super<> } - private final [ResolvedTo(CONTRACTS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(CONTRACTS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -445,12 +445,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashAndAnnotations.kt LAZY_super<> } - private final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -492,12 +492,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashAndAnnotations.kt LAZY_super<> } - private final [ResolvedTo(ANNOTATION_ARGUMENTS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(ANNOTATION_ARGUMENTS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -539,12 +539,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashAndAnnotations.kt LAZY_super<> } - private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = IntegerLiteral(1).#(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.outer|)) second/MyClass.Base| = R|/prop| + private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = IntegerLiteral(1).#(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.outer|)) second/Base| = R|/prop| public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -587,7 +587,7 @@ FILE: [ResolvedTo(BODY_RESOLVE)] delegatedFieldNestedNameClashAndAnnotations.kt super() } - private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(R|second/outer|)) second/MyClass.Base| = R|/prop| + private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(R|second/outer|)) second/Base| = R|/prop| public final [ResolvedTo(BODY_RESOLVE)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base| = R|/prop| public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base| diff --git a/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClashAndAnnotationsScript.txt b/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClashAndAnnotationsScript.txt index 573da434baa..ec29b5d0d8a 100644 --- a/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClashAndAnnotationsScript.txt +++ b/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClashAndAnnotationsScript.txt @@ -310,7 +310,7 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashAndAnnotationsScript.kt LAZY_super<> } - private final [ResolvedTo(TYPES)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(TYPES)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/Base| = LAZY_EXPRESSION public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val prop: @Anno[Unresolved](LAZY_EXPRESSION) second.Base = R|/prop| public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyClass] get(): @Anno[Unresolved](LAZY_EXPRESSION) second.Base @@ -366,12 +366,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashAndAnnotationsScript.kt LAZY_super<> } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } public? final? companion [ResolvedTo(RAW_FIR)] object Companion : R|kotlin/Any| { @@ -422,12 +422,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashAndAnnotationsScript.kt LAZY_super<> } - private final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } public? final? companion [ResolvedTo(RAW_FIR)] object Companion : R|kotlin/Any| { @@ -478,12 +478,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashAndAnnotationsScript.kt LAZY_super<> } - private final [ResolvedTo(CONTRACTS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(CONTRACTS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -534,12 +534,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashAndAnnotationsScript.kt LAZY_super<> } - private final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -590,12 +590,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashAndAnnotationsScript.kt LAZY_super<> } - private final [ResolvedTo(ANNOTATION_ARGUMENTS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(ANNOTATION_ARGUMENTS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -646,12 +646,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashAndAnnotationsScript.kt LAZY_super<> } - private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = IntegerLiteral(1).#(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.outer|)) second/MyClass.Base| = R|/prop| + private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = IntegerLiteral(1).#(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.outer|)) second/Base| = R|/prop| public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -703,7 +703,7 @@ FILE: [ResolvedTo(BODY_RESOLVE)] delegatedFieldNestedNameClashAndAnnotationsScri super() } - private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(R|second/outer|)) second/MyClass.Base| = R|/prop| + private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(R|second/outer|)) second/Base| = R|/prop| public final [ResolvedTo(BODY_RESOLVE)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base| = R|/prop| public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base| @@ -725,3 +725,4 @@ FILE: [ResolvedTo(BODY_RESOLVE)] delegatedFieldNestedNameClashAndAnnotationsScri } } + diff --git a/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClashScript.txt b/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClashScript.txt index 55e332a933f..92797d322c6 100644 --- a/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClashScript.txt +++ b/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClashScript.txt @@ -149,7 +149,7 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashScript.kts LAZY_super<> } - private final [ResolvedTo(TYPES)] field $$delegate_0: R|second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(TYPES)] field $$delegate_0: R|second/Base| = LAZY_EXPRESSION public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val prop: second.Base = R|/prop| public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyClass] get(): second.Base @@ -176,12 +176,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashScript.kts LAZY_super<> } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } } @@ -203,12 +203,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashScript.kts LAZY_super<> } - private final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] field $$delegate_0: R|second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] field $$delegate_0: R|second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } } @@ -230,12 +230,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashScript.kts LAZY_super<> } - private final [ResolvedTo(CONTRACTS)] field $$delegate_0: R|second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(CONTRACTS)] field $$delegate_0: R|second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } } @@ -257,12 +257,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashScript.kts LAZY_super<> } - private final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] field $$delegate_0: R|second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] field $$delegate_0: R|second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } } @@ -284,12 +284,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashScript.kts LAZY_super<> } - private final [ResolvedTo(ANNOTATION_ARGUMENTS)] field $$delegate_0: R|second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(ANNOTATION_ARGUMENTS)] field $$delegate_0: R|second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } } @@ -311,12 +311,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashScript.kts LAZY_super<> } - private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|second/MyClass.Base| = R|/prop| + private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|second/Base| = R|/prop| public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } } @@ -339,7 +339,7 @@ FILE: [ResolvedTo(BODY_RESOLVE)] delegatedFieldNestedNameClashScript.kts super() } - private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|second/MyClass.Base| = R|/prop| + private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|second/Base| = R|/prop| public final [ResolvedTo(BODY_RESOLVE)] [IsFromPrimaryConstructor=true] val prop: R|second/Base| = R|/prop| public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=MyClass] get(): R|second/Base| @@ -348,3 +348,4 @@ FILE: [ResolvedTo(BODY_RESOLVE)] delegatedFieldNestedNameClashScript.kts } } + diff --git a/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClashWithNestedTypes.txt b/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClashWithNestedTypes.txt index 6f2b0a0ec55..ceafd752eab 100644 --- a/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClashWithNestedTypes.txt +++ b/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClashWithNestedTypes.txt @@ -114,7 +114,7 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypes.kt LAZY_super<> } - private final [ResolvedTo(TYPES)] field $$delegate_0: R|second/MyClass.Base>| = LAZY_EXPRESSION + private final [ResolvedTo(TYPES)] field $$delegate_0: R|second/Base>| = LAZY_EXPRESSION public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val prop: second.Base> = R|/prop| public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyClass] get(): second.Base> @@ -135,12 +135,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypes.kt LAZY_super<> } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|second/MyClass.Base>| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|second/Base>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|second/Base>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|second/Base>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } } @@ -156,12 +156,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypes.kt LAZY_super<> } - private final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] field $$delegate_0: R|second/MyClass.Base>| = LAZY_EXPRESSION + private final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] field $$delegate_0: R|second/Base>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|second/Base>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|second/Base>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } } @@ -177,12 +177,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypes.kt LAZY_super<> } - private final [ResolvedTo(CONTRACTS)] field $$delegate_0: R|second/MyClass.Base>| = LAZY_EXPRESSION + private final [ResolvedTo(CONTRACTS)] field $$delegate_0: R|second/Base>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|second/Base>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|second/Base>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } } @@ -198,12 +198,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypes.kt LAZY_super<> } - private final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] field $$delegate_0: R|second/MyClass.Base>| = LAZY_EXPRESSION + private final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] field $$delegate_0: R|second/Base>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|second/Base>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|second/Base>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } } @@ -219,12 +219,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypes.kt LAZY_super<> } - private final [ResolvedTo(ANNOTATION_ARGUMENTS)] field $$delegate_0: R|second/MyClass.Base>| = LAZY_EXPRESSION + private final [ResolvedTo(ANNOTATION_ARGUMENTS)] field $$delegate_0: R|second/Base>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|second/Base>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|second/Base>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } } @@ -240,12 +240,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypes.kt LAZY_super<> } - private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|second/MyClass.Base>| = R|/prop| + private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|second/Base>| = R|/prop| public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|second/Base>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|second/Base>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } } @@ -262,7 +262,7 @@ FILE: [ResolvedTo(BODY_RESOLVE)] delegatedFieldNestedNameClashWithNestedTypes.kt super() } - private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|second/MyClass.Base>| = R|/prop| + private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|second/Base>| = R|/prop| public final [ResolvedTo(BODY_RESOLVE)] [IsFromPrimaryConstructor=true] val prop: R|second/Base>| = R|/prop| public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=MyClass] get(): R|second/Base>| diff --git a/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClashWithNestedTypesAndAnnotations.txt b/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClashWithNestedTypesAndAnnotations.txt index a55c7dc63d2..54029ab200e 100644 --- a/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClashWithNestedTypesAndAnnotations.txt +++ b/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClashWithNestedTypesAndAnnotations.txt @@ -257,7 +257,7 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesAndAnnot LAZY_super<> } - private final [ResolvedTo(TYPES)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/MyClass.Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION + private final [ResolvedTo(TYPES)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val prop: @Anno[Unresolved](LAZY_EXPRESSION) second.Base<@Anno[Unresolved](LAZY_EXPRESSION) second.Base<@Anno[Unresolved](LAZY_EXPRESSION) Int>> = R|/prop| public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyClass] get(): @Anno[Unresolved](LAZY_EXPRESSION) second.Base<@Anno[Unresolved](LAZY_EXPRESSION) second.Base<@Anno[Unresolved](LAZY_EXPRESSION) Int>> @@ -304,12 +304,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesAndAnnot LAZY_super<> } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/MyClass.Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } public? final? companion [ResolvedTo(RAW_FIR)] object Companion : R|kotlin/Any| { @@ -351,12 +351,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesAndAnnot LAZY_super<> } - private final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/MyClass.Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION + private final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } public? final? companion [ResolvedTo(RAW_FIR)] object Companion : R|kotlin/Any| { @@ -398,12 +398,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesAndAnnot LAZY_super<> } - private final [ResolvedTo(CONTRACTS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/MyClass.Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION + private final [ResolvedTo(CONTRACTS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -445,12 +445,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesAndAnnot LAZY_super<> } - private final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/MyClass.Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION + private final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -492,12 +492,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesAndAnnot LAZY_super<> } - private final [ResolvedTo(ANNOTATION_ARGUMENTS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/MyClass.Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION + private final [ResolvedTo(ANNOTATION_ARGUMENTS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -539,12 +539,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesAndAnnot LAZY_super<> } - private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = IntegerLiteral(3).#(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.outer|)) second/MyClass.Base<@R|second/Anno|(i = IntegerLiteral(4).#(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.outer|)) second/Base<@R|second/Anno|(i = IntegerLiteral(5).#(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.outer|)) kotlin/Int>>| = R|/prop| + private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = IntegerLiteral(3).#(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.outer|)) second/Base<@R|second/Anno|(i = IntegerLiteral(4).#(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.outer|)) second/Base<@R|second/Anno|(i = IntegerLiteral(5).#(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.outer|)) kotlin/Int>>| = R|/prop| public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -587,7 +587,7 @@ FILE: [ResolvedTo(BODY_RESOLVE)] delegatedFieldNestedNameClashWithNestedTypesAnd super() } - private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(3).R|kotlin/Int.plus|(R|second/outer|)) second/MyClass.Base<@R|second/Anno|(i = Int(4).R|kotlin/Int.plus|(R|second/outer|)) second/Base<@R|second/Anno|(i = Int(5).R|kotlin/Int.plus|(R|second/outer|)) kotlin/Int>>| = R|/prop| + private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(3).R|kotlin/Int.plus|(R|second/outer|)) second/Base<@R|second/Anno|(i = Int(4).R|kotlin/Int.plus|(R|second/outer|)) second/Base<@R|second/Anno|(i = Int(5).R|kotlin/Int.plus|(R|second/outer|)) kotlin/Int>>| = R|/prop| public final [ResolvedTo(BODY_RESOLVE)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) kotlin/Int>>| = R|/prop| public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) kotlin/Int>>| diff --git a/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClashWithNestedTypesAndAnnotationsScript.txt b/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClashWithNestedTypesAndAnnotationsScript.txt index f06c58c6a59..b8a6d3f7eda 100644 --- a/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClashWithNestedTypesAndAnnotationsScript.txt +++ b/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClashWithNestedTypesAndAnnotationsScript.txt @@ -310,7 +310,7 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesAndAnnot LAZY_super<> } - private final [ResolvedTo(TYPES)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/MyClass.Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION + private final [ResolvedTo(TYPES)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val prop: @Anno[Unresolved](LAZY_EXPRESSION) second.Base<@Anno[Unresolved](LAZY_EXPRESSION) second.Base<@Anno[Unresolved](LAZY_EXPRESSION) Int>> = R|/prop| public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyClass] get(): @Anno[Unresolved](LAZY_EXPRESSION) second.Base<@Anno[Unresolved](LAZY_EXPRESSION) second.Base<@Anno[Unresolved](LAZY_EXPRESSION) Int>> @@ -366,12 +366,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesAndAnnot LAZY_super<> } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/MyClass.Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } public? final? companion [ResolvedTo(RAW_FIR)] object Companion : R|kotlin/Any| { @@ -422,12 +422,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesAndAnnot LAZY_super<> } - private final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/MyClass.Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION + private final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } public? final? companion [ResolvedTo(RAW_FIR)] object Companion : R|kotlin/Any| { @@ -478,12 +478,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesAndAnnot LAZY_super<> } - private final [ResolvedTo(CONTRACTS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/MyClass.Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION + private final [ResolvedTo(CONTRACTS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -534,12 +534,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesAndAnnot LAZY_super<> } - private final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/MyClass.Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION + private final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -590,12 +590,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesAndAnnot LAZY_super<> } - private final [ResolvedTo(ANNOTATION_ARGUMENTS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/MyClass.Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION + private final [ResolvedTo(ANNOTATION_ARGUMENTS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -646,12 +646,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesAndAnnot LAZY_super<> } - private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = IntegerLiteral(3).#(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.outer|)) second/MyClass.Base<@R|second/Anno|(i = IntegerLiteral(4).#(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.outer|)) second/Base<@R|second/Anno|(i = IntegerLiteral(5).#(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.outer|)) kotlin/Int>>| = R|/prop| + private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = IntegerLiteral(3).#(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.outer|)) second/Base<@R|second/Anno|(i = IntegerLiteral(4).#(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.outer|)) second/Base<@R|second/Anno|(i = IntegerLiteral(5).#(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.outer|)) kotlin/Int>>| = R|/prop| public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -703,7 +703,7 @@ FILE: [ResolvedTo(BODY_RESOLVE)] delegatedFieldNestedNameClashWithNestedTypesAnd super() } - private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(3).R|kotlin/Int.plus|(R|second/outer|)) second/MyClass.Base<@R|second/Anno|(i = Int(4).R|kotlin/Int.plus|(R|second/outer|)) second/Base<@R|second/Anno|(i = Int(5).R|kotlin/Int.plus|(R|second/outer|)) kotlin/Int>>| = R|/prop| + private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(3).R|kotlin/Int.plus|(R|second/outer|)) second/Base<@R|second/Anno|(i = Int(4).R|kotlin/Int.plus|(R|second/outer|)) second/Base<@R|second/Anno|(i = Int(5).R|kotlin/Int.plus|(R|second/outer|)) kotlin/Int>>| = R|/prop| public final [ResolvedTo(BODY_RESOLVE)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) kotlin/Int>>| = R|/prop| public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) kotlin/Int>>| @@ -725,3 +725,4 @@ FILE: [ResolvedTo(BODY_RESOLVE)] delegatedFieldNestedNameClashWithNestedTypesAnd } } + diff --git a/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClashWithNestedTypesScript.txt b/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClashWithNestedTypesScript.txt index 691c06671cc..bb1b53f8965 100644 --- a/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClashWithNestedTypesScript.txt +++ b/analysis/low-level-api-fir/testData/lazyResolve/delegatedFieldNestedNameClashWithNestedTypesScript.txt @@ -149,7 +149,7 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesScript.k LAZY_super<> } - private final [ResolvedTo(TYPES)] field $$delegate_0: R|second/MyClass.Base>| = LAZY_EXPRESSION + private final [ResolvedTo(TYPES)] field $$delegate_0: R|second/Base>| = LAZY_EXPRESSION public? final? [ResolvedTo(RAW_FIR)] [IsFromPrimaryConstructor=true] val prop: second.Base> = R|/prop| public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=MyClass] get(): second.Base> @@ -176,12 +176,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesScript.k LAZY_super<> } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|second/MyClass.Base>| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|second/Base>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|second/Base>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|second/Base>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } } @@ -203,12 +203,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesScript.k LAZY_super<> } - private final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] field $$delegate_0: R|second/MyClass.Base>| = LAZY_EXPRESSION + private final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] field $$delegate_0: R|second/Base>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|second/Base>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|second/Base>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } } @@ -230,12 +230,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesScript.k LAZY_super<> } - private final [ResolvedTo(CONTRACTS)] field $$delegate_0: R|second/MyClass.Base>| = LAZY_EXPRESSION + private final [ResolvedTo(CONTRACTS)] field $$delegate_0: R|second/Base>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|second/Base>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|second/Base>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } } @@ -257,12 +257,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesScript.k LAZY_super<> } - private final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] field $$delegate_0: R|second/MyClass.Base>| = LAZY_EXPRESSION + private final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] field $$delegate_0: R|second/Base>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|second/Base>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|second/Base>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } } @@ -284,12 +284,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesScript.k LAZY_super<> } - private final [ResolvedTo(ANNOTATION_ARGUMENTS)] field $$delegate_0: R|second/MyClass.Base>| = LAZY_EXPRESSION + private final [ResolvedTo(ANNOTATION_ARGUMENTS)] field $$delegate_0: R|second/Base>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|second/Base>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|second/Base>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } } @@ -311,12 +311,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesScript.k LAZY_super<> } - private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|second/MyClass.Base>| = R|/prop| + private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|second/Base>| = R|/prop| public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|second/Base>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|second/Base>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } } @@ -339,7 +339,7 @@ FILE: [ResolvedTo(BODY_RESOLVE)] delegatedFieldNestedNameClashWithNestedTypesScr super() } - private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|second/MyClass.Base>| = R|/prop| + private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|second/Base>| = R|/prop| public final [ResolvedTo(BODY_RESOLVE)] [IsFromPrimaryConstructor=true] val prop: R|second/Base>| = R|/prop| public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=MyClass] get(): R|second/Base>| @@ -348,3 +348,4 @@ FILE: [ResolvedTo(BODY_RESOLVE)] delegatedFieldNestedNameClashWithNestedTypesScr } } + diff --git a/analysis/low-level-api-fir/testData/lazyResolve/functions/delegatedFieldNestedNameClashAndAnnotationsAsConstructor.txt b/analysis/low-level-api-fir/testData/lazyResolve/functions/delegatedFieldNestedNameClashAndAnnotationsAsConstructor.txt index ab28947e593..32987e31e99 100644 --- a/analysis/low-level-api-fir/testData/lazyResolve/functions/delegatedFieldNestedNameClashAndAnnotationsAsConstructor.txt +++ b/analysis/low-level-api-fir/testData/lazyResolve/functions/delegatedFieldNestedNameClashAndAnnotationsAsConstructor.txt @@ -304,12 +304,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashAndAnnotationsAsConstru LAZY_super<> } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } public? final? companion [ResolvedTo(RAW_FIR)] object Companion : R|kotlin/Any| { @@ -351,12 +351,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashAndAnnotationsAsConstru LAZY_super<> } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } public? final? companion [ResolvedTo(RAW_FIR)] object Companion : R|kotlin/Any| { @@ -398,12 +398,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashAndAnnotationsAsConstru LAZY_super<> } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -445,12 +445,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashAndAnnotationsAsConstru LAZY_super<> } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -492,12 +492,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashAndAnnotationsAsConstru LAZY_super<> } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -539,12 +539,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashAndAnnotationsAsConstru super() } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -587,7 +587,7 @@ FILE: [ResolvedTo(BODY_RESOLVE)] delegatedFieldNestedNameClashAndAnnotationsAsCo super() } - private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(R|second/outer|)) second/MyClass.Base| = R|/prop| + private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(R|second/outer|)) second/Base| = R|/prop| public final [ResolvedTo(BODY_RESOLVE)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base| = R|/prop| public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base| diff --git a/analysis/low-level-api-fir/testData/lazyResolve/functions/delegatedFieldNestedNameClashAndAnnotationsAsConstructorScript.txt b/analysis/low-level-api-fir/testData/lazyResolve/functions/delegatedFieldNestedNameClashAndAnnotationsAsConstructorScript.txt index 4f58327ac40..cb9281e3242 100644 --- a/analysis/low-level-api-fir/testData/lazyResolve/functions/delegatedFieldNestedNameClashAndAnnotationsAsConstructorScript.txt +++ b/analysis/low-level-api-fir/testData/lazyResolve/functions/delegatedFieldNestedNameClashAndAnnotationsAsConstructorScript.txt @@ -366,12 +366,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashAndAnnotationsAsConstru LAZY_super<> } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } public? final? companion [ResolvedTo(RAW_FIR)] object Companion : R|kotlin/Any| { @@ -422,12 +422,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashAndAnnotationsAsConstru LAZY_super<> } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } public? final? companion [ResolvedTo(RAW_FIR)] object Companion : R|kotlin/Any| { @@ -478,12 +478,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashAndAnnotationsAsConstru LAZY_super<> } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -534,12 +534,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashAndAnnotationsAsConstru LAZY_super<> } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -590,12 +590,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashAndAnnotationsAsConstru LAZY_super<> } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -646,12 +646,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashAndAnnotationsAsConstru super() } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/MyClass.Base| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(1).plus#(outer#)) second/Base| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -703,7 +703,7 @@ FILE: [ResolvedTo(BODY_RESOLVE)] delegatedFieldNestedNameClashAndAnnotationsAsCo super() } - private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(R|second/outer|)) second/MyClass.Base| = R|/prop| + private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(R|second/outer|)) second/Base| = R|/prop| public final [ResolvedTo(BODY_RESOLVE)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base| = R|/prop| public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base| @@ -725,3 +725,4 @@ FILE: [ResolvedTo(BODY_RESOLVE)] delegatedFieldNestedNameClashAndAnnotationsAsCo } } + diff --git a/analysis/low-level-api-fir/testData/lazyResolve/functions/delegatedFieldNestedNameClashWithNestedTypesAndAnnotationsAsConstructor.txt b/analysis/low-level-api-fir/testData/lazyResolve/functions/delegatedFieldNestedNameClashWithNestedTypesAndAnnotationsAsConstructor.txt index 3badce86d15..78d51962c63 100644 --- a/analysis/low-level-api-fir/testData/lazyResolve/functions/delegatedFieldNestedNameClashWithNestedTypesAndAnnotationsAsConstructor.txt +++ b/analysis/low-level-api-fir/testData/lazyResolve/functions/delegatedFieldNestedNameClashWithNestedTypesAndAnnotationsAsConstructor.txt @@ -304,12 +304,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesAndAnnot LAZY_super<> } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/MyClass.Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } public? final? companion [ResolvedTo(RAW_FIR)] object Companion : R|kotlin/Any| { @@ -351,12 +351,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesAndAnnot LAZY_super<> } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/MyClass.Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } public? final? companion [ResolvedTo(RAW_FIR)] object Companion : R|kotlin/Any| { @@ -398,12 +398,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesAndAnnot LAZY_super<> } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/MyClass.Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -445,12 +445,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesAndAnnot LAZY_super<> } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/MyClass.Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -492,12 +492,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesAndAnnot LAZY_super<> } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/MyClass.Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -539,12 +539,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesAndAnnot super() } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/MyClass.Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -587,7 +587,7 @@ FILE: [ResolvedTo(BODY_RESOLVE)] delegatedFieldNestedNameClashWithNestedTypesAnd super() } - private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(3).R|kotlin/Int.plus|(R|second/outer|)) second/MyClass.Base<@R|second/Anno|(i = Int(4).R|kotlin/Int.plus|(R|second/outer|)) second/Base<@R|second/Anno|(i = Int(5).R|kotlin/Int.plus|(R|second/outer|)) kotlin/Int>>| = R|/prop| + private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(3).R|kotlin/Int.plus|(R|second/outer|)) second/Base<@R|second/Anno|(i = Int(4).R|kotlin/Int.plus|(R|second/outer|)) second/Base<@R|second/Anno|(i = Int(5).R|kotlin/Int.plus|(R|second/outer|)) kotlin/Int>>| = R|/prop| public final [ResolvedTo(BODY_RESOLVE)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) kotlin/Int>>| = R|/prop| public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) kotlin/Int>>| diff --git a/analysis/low-level-api-fir/testData/lazyResolve/functions/delegatedFieldNestedNameClashWithNestedTypesAndAnnotationsAsConstructorScript.txt b/analysis/low-level-api-fir/testData/lazyResolve/functions/delegatedFieldNestedNameClashWithNestedTypesAndAnnotationsAsConstructorScript.txt index 70646193f87..419016f19bd 100644 --- a/analysis/low-level-api-fir/testData/lazyResolve/functions/delegatedFieldNestedNameClashWithNestedTypesAndAnnotationsAsConstructorScript.txt +++ b/analysis/low-level-api-fir/testData/lazyResolve/functions/delegatedFieldNestedNameClashWithNestedTypesAndAnnotationsAsConstructorScript.txt @@ -366,12 +366,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesAndAnnot LAZY_super<> } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/MyClass.Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } public? final? companion [ResolvedTo(RAW_FIR)] object Companion : R|kotlin/Any| { @@ -422,12 +422,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesAndAnnot LAZY_super<> } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/MyClass.Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } public? final? companion [ResolvedTo(RAW_FIR)] object Companion : R|kotlin/Any| { @@ -478,12 +478,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesAndAnnot LAZY_super<> } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/MyClass.Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -534,12 +534,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesAndAnnot LAZY_super<> } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/MyClass.Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -590,12 +590,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesAndAnnot LAZY_super<> } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/MyClass.Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -646,12 +646,12 @@ FILE: [ResolvedTo(IMPORTS)] delegatedFieldNestedNameClashWithNestedTypesAndAnnot super() } - private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/MyClass.Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION + private final [ResolvedTo(STATUS)] field $$delegate_0: R|@R|second/Anno|(IntegerLiteral(3).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(4).plus#(outer#)) second/Base<@R|second/Anno|(IntegerLiteral(5).plus#(outer#)) kotlin/Int>>| = LAZY_EXPRESSION public final [ResolvedTo(STATUS)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| = R|/prop| public [ResolvedTo(STATUS)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(IntegerLiteral(0).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(1).plus#(inner#)) second/Base<@R|second/Anno|(IntegerLiteral(2).plus#(inner#)) kotlin/Int>>| - public? final? [ResolvedTo(SUPER_TYPES)] interface Base<[ResolvedTo(SUPER_TYPES)] B> : R|kotlin/Any| { + public? final? [ResolvedTo(RAW_FIR)] interface Base<[ResolvedTo(RAW_FIR)] B> : R|kotlin/Any| { } public final companion [ResolvedTo(STATUS)] object Companion : R|kotlin/Any| { @@ -703,7 +703,7 @@ FILE: [ResolvedTo(BODY_RESOLVE)] delegatedFieldNestedNameClashWithNestedTypesAnd super() } - private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(3).R|kotlin/Int.plus|(R|second/outer|)) second/MyClass.Base<@R|second/Anno|(i = Int(4).R|kotlin/Int.plus|(R|second/outer|)) second/Base<@R|second/Anno|(i = Int(5).R|kotlin/Int.plus|(R|second/outer|)) kotlin/Int>>| = R|/prop| + private final [ResolvedTo(BODY_RESOLVE)] field $$delegate_0: R|@R|second/Anno|(i = Int(3).R|kotlin/Int.plus|(R|second/outer|)) second/Base<@R|second/Anno|(i = Int(4).R|kotlin/Int.plus|(R|second/outer|)) second/Base<@R|second/Anno|(i = Int(5).R|kotlin/Int.plus|(R|second/outer|)) kotlin/Int>>| = R|/prop| public final [ResolvedTo(BODY_RESOLVE)] [IsFromPrimaryConstructor=true] val prop: R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) kotlin/Int>>| = R|/prop| public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=MyClass] get(): R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) kotlin/Int>>| @@ -725,3 +725,4 @@ FILE: [ResolvedTo(BODY_RESOLVE)] delegatedFieldNestedNameClashWithNestedTypesAnd } } + diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirTypeResolveTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirTypeResolveTransformer.kt index 41d4993303b..f007af49db2 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirTypeResolveTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirTypeResolveTransformer.kt @@ -431,8 +431,17 @@ open class FirTypeResolveTransformer( } // ConstructedTypeRef should be resolved only with type parameters, but not with nested classes and classes from supertypes - for (constructor in firClass.declarations.filterIsInstance()) { - transformDelegatedConstructorCall(constructor) + for (declaration in firClass.declarations) { + when (declaration) { + is FirConstructor -> transformDelegatedConstructorCall(declaration) + is FirField -> { + if (declaration.origin == FirDeclarationOrigin.Synthetic.DelegateField) { + transformDelegateField(declaration) + } + } + + else -> {} + } } } } @@ -446,6 +455,10 @@ open class FirTypeResolveTransformer( constructor.delegatedConstructor?.let(this::resolveConstructedTypeRefForDelegatedConstructorCall) } + fun transformDelegateField(field: FirField) { + field.transformReturnTypeRef(this, null) + } + fun removeOuterTypeParameterScope(firClass: FirClass): Boolean = !firClass.isInner && !firClass.isLocal inline fun withClassScopes( diff --git a/compiler/testData/codegen/box/delegation/nestedNameClash.fir.ir.txt b/compiler/testData/codegen/box/delegation/nestedNameClash.fir.ir.txt new file mode 100644 index 00000000000..df7415c6702 --- /dev/null +++ b/compiler/testData/codegen/box/delegation/nestedNameClash.fir.ir.txt @@ -0,0 +1,109 @@ +FILE fqName:second fileName:/nestedNameClash.kt + FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String + BLOCK_BODY + VAR name:data type:second.MyClass [val] + CONSTRUCTOR_CALL 'public constructor (prop: second.Base>) declared in second.MyClass' type=second.MyClass origin=null + prop: BLOCK type=second.box. origin=OBJECT_LITERAL + CLASS CLASS name: modality:FINAL visibility:local superTypes:[second.Base>] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:second.box. + CONSTRUCTOR visibility:public <> () returnType:second.box. [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name: modality:FINAL visibility:local superTypes:[second.Base>]' + FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN <> ($this:second.Base>) returnType:kotlin.String [fake_override] + overridden: + public open fun foo (): kotlin.String declared in second.Base + $this: VALUE_PARAMETER name: type:second.Base> + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in second.Base + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in second.Base + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in second.Base + $this: VALUE_PARAMETER name: type:kotlin.Any + CONSTRUCTOR_CALL 'public constructor () declared in second.box.' type=second.box. origin=OBJECT_LITERAL + RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in second' + CALL 'public open fun foo (): kotlin.String declared in second.MyClass' type=kotlin.String origin=null + $this: GET_VAR 'val data: second.MyClass declared in second.box' type=second.MyClass origin=null + CLASS INTERFACE name:Base modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:second.Base + TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false + FUN name:foo visibility:public modality:OPEN <> ($this:second.Base) returnType:kotlin.String + $this: VALUE_PARAMETER name: type:second.Base + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun foo (): kotlin.String declared in second.Base' + CONST String type=kotlin.String value="OK" + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + CLASS CLASS name:MyClass modality:FINAL visibility:public superTypes:[second.Base>] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:second.MyClass + CONSTRUCTOR visibility:public <> (prop:second.Base>) returnType:second.MyClass [primary] + VALUE_PARAMETER name:prop index:0 type:second.Base> + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyClass modality:FINAL visibility:public superTypes:[second.Base>]' + PROPERTY name:prop visibility:public modality:FINAL [val] + FIELD PROPERTY_BACKING_FIELD name:prop type:second.Base> visibility:private [final] + EXPRESSION_BODY + GET_VAR 'prop: second.Base> declared in second.MyClass.' type=second.Base> origin=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:second.MyClass) returnType:second.Base> + correspondingProperty: PROPERTY name:prop visibility:public modality:FINAL [val] + $this: VALUE_PARAMETER name: type:second.MyClass + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): second.Base> declared in second.MyClass' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:prop type:second.Base> visibility:private [final]' type=second.Base> origin=null + receiver: GET_VAR ': second.MyClass declared in second.MyClass.' type=second.MyClass origin=null + FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:second.MyClass) returnType:kotlin.String + overridden: + public open fun foo (): kotlin.String declared in second.Base + $this: VALUE_PARAMETER name: type:second.MyClass + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun foo (): kotlin.String declared in second.MyClass' + CALL 'public open fun foo (): kotlin.String declared in second.Base' type=kotlin.String origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:prop type:second.Base> visibility:private [final]' type=second.Base> origin=null + receiver: GET_VAR ': second.MyClass declared in second.MyClass.foo' type=second.MyClass origin=null + CLASS INTERFACE name:Base modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:second.MyClass.Base + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in second.Base + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in second.Base + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in second.Base + $this: VALUE_PARAMETER name: type:kotlin.Any diff --git a/compiler/testData/codegen/box/delegation/nestedNameClash.kt b/compiler/testData/codegen/box/delegation/nestedNameClash.kt index 1cb316dab01..7f62e05efdc 100644 --- a/compiler/testData/codegen/box/delegation/nestedNameClash.kt +++ b/compiler/testData/codegen/box/delegation/nestedNameClash.kt @@ -1,5 +1,4 @@ // DUMP_IR -// IGNORE_BACKEND_K2: ANY package second fun box(): String { diff --git a/compiler/testData/codegen/box/delegation/nestedNameClash2.fir.ir.txt b/compiler/testData/codegen/box/delegation/nestedNameClash2.fir.ir.txt index 5e98df39183..69c22b183ee 100644 --- a/compiler/testData/codegen/box/delegation/nestedNameClash2.fir.ir.txt +++ b/compiler/testData/codegen/box/delegation/nestedNameClash2.fir.ir.txt @@ -69,6 +69,15 @@ FILE fqName:second fileName:/nestedNameClash2.kt RETURN type=kotlin.Nothing from='public final fun (): second.Base declared in second.MyClass' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:prop type:second.Base visibility:private [final]' type=second.Base origin=null receiver: GET_VAR ': second.MyClass declared in second.MyClass.' type=second.MyClass origin=null + FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:second.MyClass) returnType:kotlin.String + overridden: + public open fun foo (): kotlin.String declared in second.Base + $this: VALUE_PARAMETER name: type:second.MyClass + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun foo (): kotlin.String declared in second.MyClass' + CALL 'public open fun foo (): kotlin.String declared in second.Base' type=kotlin.String origin=null + $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:prop type:second.Base visibility:private [final]' type=second.Base origin=null + receiver: GET_VAR ': second.MyClass declared in second.MyClass.foo' type=second.MyClass origin=null CLASS INTERFACE name:Base modality:ABSTRACT visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:second.MyClass.Base FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] @@ -97,7 +106,3 @@ FILE fqName:second fileName:/nestedNameClash2.kt overridden: public open fun toString (): kotlin.String declared in second.Base $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN <> ($this:second.Base) returnType:kotlin.String [fake_override] - overridden: - public open fun foo (): kotlin.String declared in second.Base - $this: VALUE_PARAMETER name: type:second.Base diff --git a/compiler/testData/codegen/box/delegation/nestedNameClash2.kt b/compiler/testData/codegen/box/delegation/nestedNameClash2.kt index 4e2db11ccc0..1ca1f756968 100644 --- a/compiler/testData/codegen/box/delegation/nestedNameClash2.kt +++ b/compiler/testData/codegen/box/delegation/nestedNameClash2.kt @@ -1,5 +1,4 @@ // DUMP_IR -// IGNORE_CODEGEN_WITH_IR_FAKE_OVERRIDE_GENERATION package second fun box(): String { diff --git a/compiler/testData/diagnostics/tests/delegation/clashes/nestedNameClash.fir.txt b/compiler/testData/diagnostics/tests/delegation/clashes/nestedNameClash.fir.txt index f2d70cabc5a..ff255bd22ef 100644 --- a/compiler/testData/diagnostics/tests/delegation/clashes/nestedNameClash.fir.txt +++ b/compiler/testData/diagnostics/tests/delegation/clashes/nestedNameClash.fir.txt @@ -9,7 +9,7 @@ FILE: nestedNameClash.kt } ) - R|/data|.R|second/Base.foo|() + R|/data|.R|second/MyClass.foo|() } public abstract interface Base : R|kotlin/Any| { public open fun foo(): R|kotlin/Unit| { @@ -21,7 +21,7 @@ FILE: nestedNameClash.kt super() } - private final field $$delegate_0: R|second/MyClass.Base| = R|/prop| + private final field $$delegate_0: R|second/Base| = R|/prop| public final val prop: R|second/Base| = R|/prop| public get(): R|second/Base| diff --git a/compiler/testData/diagnostics/tests/delegation/clashes/nestedNameClash2.fir.txt b/compiler/testData/diagnostics/tests/delegation/clashes/nestedNameClash2.fir.txt index 809ff3343ca..90d871fef5f 100644 --- a/compiler/testData/diagnostics/tests/delegation/clashes/nestedNameClash2.fir.txt +++ b/compiler/testData/diagnostics/tests/delegation/clashes/nestedNameClash2.fir.txt @@ -9,7 +9,7 @@ FILE: nestedNameClash2.kt } ) - R|/data|.R|SubstitutionOverride|() + R|/data|.R|second/MyClass.foo|() } public abstract interface Base : R|kotlin/Any| { public open fun foo(): R|kotlin/Unit| { @@ -21,7 +21,7 @@ FILE: nestedNameClash2.kt super() } - private final field $$delegate_0: R|second/MyClass.Base>| = R|/prop| + private final field $$delegate_0: R|second/Base>| = R|/prop| public final val prop: R|second/Base>| = R|/prop| public get(): R|second/Base>| diff --git a/compiler/testData/diagnostics/tests/delegation/clashes/nestedNameClash3.fir.kt b/compiler/testData/diagnostics/tests/delegation/clashes/nestedNameClash3.fir.kt deleted file mode 100644 index e625c27cf88..00000000000 --- a/compiler/testData/diagnostics/tests/delegation/clashes/nestedNameClash3.fir.kt +++ /dev/null @@ -1,15 +0,0 @@ -// FIR_DUMP -package second - -fun main() { - val data = MyClass(object : Base> {}) - data.foo() -} - -interface Base { - fun foo() {} -} - -class MyClass(val prop: second.Base>): Base> by prop { - interface Base -} diff --git a/compiler/testData/diagnostics/tests/delegation/clashes/nestedNameClash3.fir.txt b/compiler/testData/diagnostics/tests/delegation/clashes/nestedNameClash3.fir.txt index e70006cbaf9..922f0a290d7 100644 --- a/compiler/testData/diagnostics/tests/delegation/clashes/nestedNameClash3.fir.txt +++ b/compiler/testData/diagnostics/tests/delegation/clashes/nestedNameClash3.fir.txt @@ -1,4 +1,4 @@ -FILE: nestedNameClash3.fir.kt +FILE: nestedNameClash3.kt package second public final fun main(): R|kotlin/Unit| { @@ -9,7 +9,7 @@ FILE: nestedNameClash3.fir.kt } ) - R|/data|.R|SubstitutionOverride|() + R|/data|.R|second/MyClass.foo|() } public abstract interface Base : R|kotlin/Any| { public open fun foo(): R|kotlin/Unit| { @@ -21,7 +21,7 @@ FILE: nestedNameClash3.fir.kt super() } - private final field $$delegate_0: = R|/prop| + private final field $$delegate_0: R|second/Base>| = R|/prop| public final val prop: R|second/Base>| = R|/prop| public get(): R|second/Base>| diff --git a/compiler/testData/diagnostics/tests/delegation/clashes/nestedNameClash3.kt b/compiler/testData/diagnostics/tests/delegation/clashes/nestedNameClash3.kt index 5b699aa0fee..da3c100a4de 100644 --- a/compiler/testData/diagnostics/tests/delegation/clashes/nestedNameClash3.kt +++ b/compiler/testData/diagnostics/tests/delegation/clashes/nestedNameClash3.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FIR_DUMP package second diff --git a/compiler/testData/diagnostics/tests/delegation/clashes/nestedNameClashAndAnnotations.fir.txt b/compiler/testData/diagnostics/tests/delegation/clashes/nestedNameClashAndAnnotations.fir.txt index 275a75e8f3f..3341e2cfbbc 100644 --- a/compiler/testData/diagnostics/tests/delegation/clashes/nestedNameClashAndAnnotations.fir.txt +++ b/compiler/testData/diagnostics/tests/delegation/clashes/nestedNameClashAndAnnotations.fir.txt @@ -24,7 +24,7 @@ FILE: nestedNameClashAndAnnotations.kt super() } - private final field $$delegate_0: R|@R|second/Anno|(i = Int(3).R|kotlin/Int.plus|(R|second/outer|)) second/MyClass.Base<@R|second/Anno|(i = Int(4).R|kotlin/Int.plus|(R|second/outer|)) second/Base<@R|second/Anno|(i = Int(5).R|kotlin/Int.plus|(R|second/outer|)) kotlin/Int>>| = R|/prop| + private final field $$delegate_0: R|@R|second/Anno|(i = Int(3).R|kotlin/Int.plus|(R|second/outer|)) second/Base<@R|second/Anno|(i = Int(4).R|kotlin/Int.plus|(R|second/outer|)) second/Base<@R|second/Anno|(i = Int(5).R|kotlin/Int.plus|(R|second/outer|)) kotlin/Int>>| = R|/prop| public final val prop: R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) kotlin/Int>>| = R|/prop| public get(): R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) kotlin/Int>>| diff --git a/compiler/testData/diagnostics/tests/delegation/clashes/nestedNameClashAndAnnotations.reversed.fir.txt b/compiler/testData/diagnostics/tests/delegation/clashes/nestedNameClashAndAnnotations.reversed.fir.txt index 6673ede164b..16918976d78 100644 --- a/compiler/testData/diagnostics/tests/delegation/clashes/nestedNameClashAndAnnotations.reversed.fir.txt +++ b/compiler/testData/diagnostics/tests/delegation/clashes/nestedNameClashAndAnnotations.reversed.fir.txt @@ -24,7 +24,7 @@ FILE: nestedNameClashAndAnnotations.reversed.kt super() } - private final field $$delegate_0: R|@R|second/Anno|(i = IntegerLiteral(3).#(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.outer|)) second/MyClass.Base<@R|second/Anno|(i = IntegerLiteral(4).#(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.outer|)) second/Base<@R|second/Anno|(i = IntegerLiteral(5).#(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.outer|)) kotlin/Int>>| = R|/prop| + private final field $$delegate_0: R|@R|second/Anno|(i = IntegerLiteral(3).#(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.outer|)) second/Base<@R|second/Anno|(i = IntegerLiteral(4).#(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.outer|)) second/Base<@R|second/Anno|(i = IntegerLiteral(5).#(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.outer|)) kotlin/Int>>| = R|/prop| public final val prop: R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) kotlin/Int>>| = R|/prop| public get(): R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) kotlin/Int>>| diff --git a/compiler/testData/diagnostics/tests/scopes/classHeader/classParents.fir.kt b/compiler/testData/diagnostics/tests/scopes/classHeader/classParents.fir.kt index c3b8fec0203..b24d779e3b0 100644 --- a/compiler/testData/diagnostics/tests/scopes/classHeader/classParents.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/classHeader/classParents.fir.kt @@ -2,7 +2,7 @@ interface I -class A(impl: Interface) : Nested(), Interface by impl, Inner, I<Nested, Interface, Inner> { +class A(impl: Interface) : Nested(), Interface by impl, Inner, I<Nested, Interface, Inner> { class Nested diff --git a/compiler/testData/diagnostics/tests/scopes/classHeader/objectParents.fir.kt b/compiler/testData/diagnostics/tests/scopes/classHeader/objectParents.fir.kt index d3a1ec33824..81ad5343569 100644 --- a/compiler/testData/diagnostics/tests/scopes/classHeader/objectParents.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/classHeader/objectParents.fir.kt @@ -3,7 +3,7 @@ interface I val aImpl: A.Interface get() = null!! -object A : Nested(), Interface by aImpl, I<Nested, Interface> { +object A : Nested(), Interface by aImpl, I<Nested, Interface> { class Nested