diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/Candidate.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/Candidate.kt index e38dd1f8593..94993e6e63b 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/Candidate.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/Candidate.kt @@ -18,7 +18,6 @@ import org.jetbrains.kotlin.fir.symbols.AbstractFirBasedSymbol import org.jetbrains.kotlin.fir.types.ConeKotlinType import org.jetbrains.kotlin.fir.types.ConeTypeVariable import org.jetbrains.kotlin.fir.types.FirTypeProjection -import org.jetbrains.kotlin.fir.types.FirTypeRef import org.jetbrains.kotlin.resolve.calls.inference.ConstraintSystemBuilder import org.jetbrains.kotlin.resolve.calls.inference.ConstraintSystemOperation import org.jetbrains.kotlin.resolve.calls.inference.model.ConstraintStorage @@ -48,7 +47,7 @@ class CallInfo( CallInfo( callKind, explicitReceiver, listOf(receiverExpression) + arguments, - isSafeCall, typeArguments, session, containingFile, implicitReceiverStack, expectedType, outerCSBuilder, lhs, typeProvider + isSafeCall, typeArguments, session, containingFile, implicitReceiverStack, expectedType, outerCSBuilder, lhs ) } @@ -63,7 +62,7 @@ enum class CandidateApplicability { class Candidate( val symbol: AbstractFirBasedSymbol<*>, - val dispatchReceiverValue: ClassDispatchReceiverValue?, + val dispatchReceiverValue: ReceiverValue?, val implicitExtensionReceiverValue: ImplicitReceiverValue<*>?, val explicitReceiverKind: ExplicitReceiverKind, val bodyResolveComponents: BodyResolveComponents, diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/CandidateFactory.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/CandidateFactory.kt index b679d940f73..944193c4c47 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/CandidateFactory.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/CandidateFactory.kt @@ -31,7 +31,7 @@ class CandidateFactory( fun createCandidate( symbol: AbstractFirBasedSymbol<*>, explicitReceiverKind: ExplicitReceiverKind, - dispatchReceiverValue: ClassDispatchReceiverValue? = null, + dispatchReceiverValue: ReceiverValue? = null, implicitExtensionReceiverValue: ImplicitReceiverValue<*>? = null, builtInExtensionFunctionReceiverValue: ReceiverValue? = null ): Candidate { diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/TowerDataConsumers.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/TowerDataConsumers.kt index b37f4e6281a..cb20a2d1117 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/TowerDataConsumers.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/TowerDataConsumers.kt @@ -65,7 +65,7 @@ class QualifiedReceiverTowerDataConsumer>( private inner class TowerLevelProcessorImpl(val group: Int) : TowerScopeLevel.TowerScopeLevelProcessor { override fun consumeCandidate( symbol: T, - dispatchReceiverValue: ClassDispatchReceiverValue?, + dispatchReceiverValue: ReceiverValue?, implicitExtensionReceiverValue: ImplicitReceiverValue<*>?, builtInExtensionFunctionReceiverValue: ReceiverValue? ): ProcessorAction { @@ -198,7 +198,7 @@ class ExplicitReceiverTowerDataConsumer>( private inner class EmptyKindTowerProcessor(val group: Int) : TowerScopeLevel.TowerScopeLevelProcessor { override fun consumeCandidate( symbol: T, - dispatchReceiverValue: ClassDispatchReceiverValue?, + dispatchReceiverValue: ReceiverValue?, implicitExtensionReceiverValue: ImplicitReceiverValue<*>?, builtInExtensionFunctionReceiverValue: ReceiverValue? ): ProcessorAction { @@ -219,7 +219,7 @@ class ExplicitReceiverTowerDataConsumer>( private inner class TowerLevelKindTowerProcessor(val group: Int) : TowerScopeLevel.TowerScopeLevelProcessor { override fun consumeCandidate( symbol: T, - dispatchReceiverValue: ClassDispatchReceiverValue?, + dispatchReceiverValue: ReceiverValue?, implicitExtensionReceiverValue: ImplicitReceiverValue<*>?, builtInExtensionFunctionReceiverValue: ReceiverValue? ): ProcessorAction { @@ -291,7 +291,7 @@ class NoExplicitReceiverTowerDataConsumer>( private inner class TowerLevelProcessorImpl(val group: Int) : TowerScopeLevel.TowerScopeLevelProcessor { override fun consumeCandidate( symbol: T, - dispatchReceiverValue: ClassDispatchReceiverValue?, + dispatchReceiverValue: ReceiverValue?, implicitExtensionReceiverValue: ImplicitReceiverValue<*>?, builtInExtensionFunctionReceiverValue: ReceiverValue? ): ProcessorAction { diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/TowerLevels.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/TowerLevels.kt index dcf01bb4691..ccceb1f56c8 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/TowerLevels.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/TowerLevels.kt @@ -5,21 +5,21 @@ package org.jetbrains.kotlin.fir.resolve.calls -import org.jetbrains.kotlin.descriptors.ClassKind import org.jetbrains.kotlin.fir.FirSession import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.declarations.impl.FirImportImpl import org.jetbrains.kotlin.fir.declarations.impl.FirResolvedImportImpl +import org.jetbrains.kotlin.fir.expressions.FirExpression import org.jetbrains.kotlin.fir.expressions.FirResolvedQualifier -import org.jetbrains.kotlin.fir.resolve.BodyResolveComponents -import org.jetbrains.kotlin.fir.resolve.ScopeSession -import org.jetbrains.kotlin.fir.resolve.firSymbolProvider +import org.jetbrains.kotlin.fir.resolve.* import org.jetbrains.kotlin.fir.scopes.FirScope import org.jetbrains.kotlin.fir.scopes.ProcessorAction import org.jetbrains.kotlin.fir.scopes.impl.FirAbstractImportingScope import org.jetbrains.kotlin.fir.scopes.impl.FirExplicitSimpleImportingScope import org.jetbrains.kotlin.fir.symbols.AbstractFirBasedSymbol import org.jetbrains.kotlin.fir.symbols.impl.* +import org.jetbrains.kotlin.fir.types.ConeKotlinType +import org.jetbrains.kotlin.fir.types.ConeNullability import org.jetbrains.kotlin.fir.types.isExtensionFunctionType import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.name.Name @@ -45,7 +45,7 @@ interface TowerScopeLevel { interface TowerScopeLevelProcessor> { fun consumeCandidate( symbol: T, - dispatchReceiverValue: ClassDispatchReceiverValue?, + dispatchReceiverValue: ReceiverValue?, implicitExtensionReceiverValue: ImplicitReceiverValue<*>?, builtInExtensionFunctionReceiverValue: ReceiverValue? = null ): ProcessorAction @@ -110,9 +110,7 @@ class MemberScopeTowerLevel( if (candidate is FirCallableSymbol<*> && (implicitExtensionInvokeMode || candidate.hasConsistentExtensionReceiver(extensionReceiver)) ) { - // NB: we do not check dispatchReceiverValue != null here, - // because of objects & constructors (see comments in dispatchReceiverValue() implementation) - val dispatchReceiverValue = candidate.dispatchReceiverValue() + val dispatchReceiverValue = NotNullableReceiverValue(dispatchReceiver) if (implicitExtensionInvokeMode) { if (output.consumeCandidate( candidate, dispatchReceiverValue, @@ -139,7 +137,7 @@ class MemberScopeTowerLevel( ) return ProcessorAction.STOP val withSynthetic = FirSyntheticPropertiesScope(session, scope) return withSynthetic.processScopeMembers { symbol -> - output.consumeCandidate(symbol, symbol.dispatchReceiverValue(), implicitExtensionReceiver, null) + output.consumeCandidate(symbol, NotNullableReceiverValue(dispatchReceiver), implicitExtensionReceiver, null) } } @@ -187,7 +185,7 @@ class ScopeTowerLevel( extensionsOnly && !hasExtensionReceiver() -> false !hasConsistentExtensionReceiver(extensionReceiver) -> false scope is FirAbstractImportingScope -> true - else -> dispatchReceiverValue().let { it == null || it.klassSymbol.fir.classKind == ClassKind.OBJECT } + else -> true } override fun > processElementsByName( @@ -204,12 +202,8 @@ class ScopeTowerLevel( return when (token) { TowerScopeLevel.Token.Properties -> scope.processPropertiesByName(name) { candidate -> if (candidate.hasConsistentReceivers(extensionReceiver)) { - val dispatchReceiverValue = when (candidate) { - is FirBackingFieldSymbol -> candidate.fir.symbol.dispatchReceiverValue() - else -> candidate.dispatchReceiverValue() - } processor.consumeCandidate( - candidate as T, dispatchReceiverValue = dispatchReceiverValue, + candidate as T, dispatchReceiverValue = null, implicitExtensionReceiverValue = implicitExtensionReceiver ) } else { @@ -223,7 +217,7 @@ class ScopeTowerLevel( ) { candidate -> if (candidate.hasConsistentReceivers(extensionReceiver)) { processor.consumeCandidate( - candidate as T, dispatchReceiverValue = candidate.dispatchReceiverValue(), + candidate as T, dispatchReceiverValue = null, implicitExtensionReceiverValue = implicitExtensionReceiver ) } else { @@ -300,6 +294,14 @@ class QualifiedReceiverTowerLevel( } } + +class NotNullableReceiverValue(val value: ReceiverValue) : ReceiverValue { + override val type: ConeKotlinType + get() = value.type.withNullability(ConeNullability.NOT_NULL) + override val receiverExpression: FirExpression + get() = value.receiverExpression +} + fun FirCallableDeclaration<*>.dispatchReceiverValue(session: FirSession): ClassDispatchReceiverValue? { // TODO: this is not true atCall least for inner class constructors if (this is FirConstructor) return null diff --git a/compiler/fir/resolve/testData/resolve/arguments/lambdaInLambda.txt b/compiler/fir/resolve/testData/resolve/arguments/lambdaInLambda.txt index 799cd52aef7..dc0aec8e42f 100644 --- a/compiler/fir/resolve/testData/resolve/arguments/lambdaInLambda.txt +++ b/compiler/fir/resolve/testData/resolve/arguments/lambdaInLambda.txt @@ -26,7 +26,7 @@ FILE: lambdaInLambda.kt public final fun test(ordinal: R|kotlin/Int|): R|kotlin/Unit| { R|/buildString|( = buildString@fun R|StringBuilder|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|/insert|(R|/KDocTemplate.KDocTemplate|(), = insert@fun R|KDocTemplate|.(): R|kotlin/Unit| { - this@R|/KDocTemplate|.R|/KDocTemplate.definition|( = definition@fun R|StringBuilder|.(): R|kotlin/Unit| { + this@R|special/anonymous|.R|/KDocTemplate.definition|( = definition@fun R|StringBuilder|.(): R|kotlin/Unit| { R|/ordinal|?.R|kotlin/let|( = let@fun (it: R|kotlin/Int|): R|kotlin/Unit| { Unit } diff --git a/compiler/fir/resolve/testData/resolve/cfg/complex.dot b/compiler/fir/resolve/testData/resolve/cfg/complex.dot index 6eab838f8be..6909d6a94f7 100644 --- a/compiler/fir/resolve/testData/resolve/cfg/complex.dot +++ b/compiler/fir/resolve/testData/resolve/cfg/complex.dot @@ -206,7 +206,7 @@ digraph complex_kt { subgraph cluster_19 { color=blue 79 [label="Enter block"]; - 80 [label="Function call: this@R|/AutoCloseable|.R|/AutoCloseable.close|()"]; + 80 [label="Function call: this@R|/closeFinally|.R|/AutoCloseable.close|()"]; 81 [label="Exit block"]; } 82 [label="Try main block exit"]; @@ -233,7 +233,7 @@ digraph complex_kt { subgraph cluster_22 { color=blue 94 [label="Enter block"]; - 95 [label="Function call: this@R|/AutoCloseable|.R|/AutoCloseable.close|()"]; + 95 [label="Function call: this@R|/closeFinally|.R|/AutoCloseable.close|()"]; 96 [label="Exit block"]; } 97 [label="Exit when branch result"]; @@ -250,11 +250,11 @@ digraph complex_kt { ==(this@R|/closeFinally|, Null(null)) -> { } ==(R|/cause|, Null(null)) -> { - this@R|/AutoCloseable|.R|/AutoCloseable.close|() + this@R|/closeFinally|.R|/AutoCloseable.close|() } else -> { try { - this@R|/AutoCloseable|.R|/AutoCloseable.close|() + this@R|/closeFinally|.R|/AutoCloseable.close|() } catch (closeException: R|kotlin/Throwable|) { R|/cause|.R|kotlin/addSuppressed|(R|/closeException|) diff --git a/compiler/fir/resolve/testData/resolve/cfg/complex.txt b/compiler/fir/resolve/testData/resolve/cfg/complex.txt index bee72386717..a5e653cd4b4 100644 --- a/compiler/fir/resolve/testData/resolve/cfg/complex.txt +++ b/compiler/fir/resolve/testData/resolve/cfg/complex.txt @@ -24,11 +24,11 @@ FILE: complex.kt ==(this@R|/closeFinally|, Null(null)) -> { } ==(R|/cause|, Null(null)) -> { - this@R|/AutoCloseable|.R|/AutoCloseable.close|() + this@R|/closeFinally|.R|/AutoCloseable.close|() } else -> { try { - this@R|/AutoCloseable|.R|/AutoCloseable.close|() + this@R|/closeFinally|.R|/AutoCloseable.close|() } catch (closeException: R|kotlin/Throwable|) { R|/cause|.R|kotlin/addSuppressed|(R|/closeException|) diff --git a/compiler/fir/resolve/testData/resolve/expresssions/access.txt b/compiler/fir/resolve/testData/resolve/expresssions/access.txt index 48f29ca4a2f..a75324c9f5c 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/access.txt +++ b/compiler/fir/resolve/testData/resolve/expresssions/access.txt @@ -25,7 +25,7 @@ FILE: access.kt public get(): R|kotlin/String| public final fun R|Foo|.abc(): R|kotlin/Int| { - ^abc this@R|/Foo|.R|/Foo.x| + ^abc this@R|/Bar.abc|.R|/Foo.x| } public final fun bar(): R|Bar| { @@ -37,7 +37,7 @@ FILE: access.kt } public final fun R|Foo|.check(): { - ^check this@R|/Foo|.R|/Foo.abc|().#(this@R|/Bar|.R|/Bar.bar|()) + ^check this@R|/Bar.check|.R|/Foo.abc|().#(this@R|/Bar|.R|/Bar.bar|()) } public final fun R|Foo|.check2(): R|kotlin/String| { @@ -46,7 +46,7 @@ FILE: access.kt } public final fun R|Foo|.ext(): R|kotlin/Int| { - ^ext this@R|/Foo|.R|/Foo.x| + ^ext this@R|/ext|.R|/Foo.x| } public final fun bar(): R|kotlin/Unit| { } diff --git a/compiler/fir/resolve/testData/resolve/expresssions/companion.txt b/compiler/fir/resolve/testData/resolve/expresssions/companion.txt index 27b77514e9a..d1e9297592d 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/companion.txt +++ b/compiler/fir/resolve/testData/resolve/expresssions/companion.txt @@ -18,7 +18,7 @@ FILE: companion.kt } public final fun bar(): R|kotlin/Unit| { - this@R|/A.Companion|.R|/A.Companion.foo|() + R|/A.Companion.foo|() } } diff --git a/compiler/fir/resolve/testData/resolve/expresssions/companionExtension.txt b/compiler/fir/resolve/testData/resolve/expresssions/companionExtension.txt index 61d6dbe45de..93324fcc168 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/companionExtension.txt +++ b/compiler/fir/resolve/testData/resolve/expresssions/companionExtension.txt @@ -15,7 +15,7 @@ FILE: companionExtension.kt } public final fun test(): R|kotlin/Unit| { - (this@R|/My.Companion|, this@R|/My|).R|/My.Companion.foo|() + this@R|/My|.R|/My.Companion.foo|() } } diff --git a/compiler/fir/resolve/testData/resolve/expresssions/extensionPropertyInLambda.txt b/compiler/fir/resolve/testData/resolve/expresssions/extensionPropertyInLambda.txt index 6785bfc9bca..ed345a2653a 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/extensionPropertyInLambda.txt +++ b/compiler/fir/resolve/testData/resolve/expresssions/extensionPropertyInLambda.txt @@ -11,10 +11,10 @@ FILE: extensionPropertyInLambda.kt } public final var R|C|.y: R|T| public get(): R|T| { - ^ this@R|/C|.R|FakeOverride| + ^ this@R|/y|.R|FakeOverride| } public set(v: R|T|): R|kotlin/Unit| { - this@R|/C|.R|FakeOverride| = R|/v| + this@R|/y|.R|FakeOverride| = R|/v| } public final fun use(f: R|() -> kotlin/String|): R|kotlin/Unit| { } diff --git a/compiler/fir/resolve/testData/resolve/expresssions/genericDecorator.txt b/compiler/fir/resolve/testData/resolve/expresssions/genericDecorator.txt index acb550e6810..d557863c8db 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/genericDecorator.txt +++ b/compiler/fir/resolve/testData/resolve/expresssions/genericDecorator.txt @@ -5,7 +5,7 @@ FILE: test.kt } public final override fun getLookupString(): R|kotlin/String| { - ^getLookupString this@R|/Decorator|.R|/Decorator.delegate|.R|/LookupElement.lookupString| + ^getLookupString this@R|/MyDecorator|.R|/Decorator.delegate|.R|/LookupElement.lookupString| } } diff --git a/compiler/fir/resolve/testData/resolve/expresssions/genericPropertyAccess.txt b/compiler/fir/resolve/testData/resolve/expresssions/genericPropertyAccess.txt index 0a569532908..31dd6da56e9 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/genericPropertyAccess.txt +++ b/compiler/fir/resolve/testData/resolve/expresssions/genericPropertyAccess.txt @@ -16,7 +16,7 @@ FILE: genericPropertyAccess.kt } public final override fun foo(): R|T| { - ^foo this@R|/Base|.R|FakeOverride| + ^foo this@R|/Derived|.R|FakeOverride| } } diff --git a/compiler/fir/resolve/testData/resolve/expresssions/importedReceiver.txt b/compiler/fir/resolve/testData/resolve/expresssions/importedReceiver.txt index a906f437009..dfeea57225b 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/importedReceiver.txt +++ b/compiler/fir/resolve/testData/resolve/expresssions/importedReceiver.txt @@ -26,10 +26,10 @@ FILE: importedReceiver.kt public final fun test(): R|kotlin/Unit| { Int(42).R|/foo|() String().R|/foo|() - (this@R|/My|, Int(42)).R|/My.bar|() - (this@R|/My|, String()).R|/My.bar|() - this@R|/My|.R|/My.baz|() - (this@R|/My|, Boolean(true)).R|/My.gau|() - this@R|/Your|.R|/Your.wat|() - (this@R|/Your|, Boolean(false)).R|FakeOverride|() + Int(42).R|/My.bar|() + String().R|/My.bar|() + R|/My.baz|() + Boolean(true).R|/My.gau|() + R|/Your.wat|() + Boolean(false).R|FakeOverride|() } diff --git a/compiler/fir/resolve/testData/resolve/expresssions/lambdaWithReceiver.txt b/compiler/fir/resolve/testData/resolve/expresssions/lambdaWithReceiver.txt index 4af38c4dd2e..7e81775f64d 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/lambdaWithReceiver.txt +++ b/compiler/fir/resolve/testData/resolve/expresssions/lambdaWithReceiver.txt @@ -13,19 +13,19 @@ FILE: lambdaWithReceiver.kt } public final fun test_1(): R|kotlin/Unit| { R|/withA|( = withA@fun R|A|.(): R|kotlin/Unit| { - this@R|/A|.R|/A.foo|() + this@R|special/anonymous|.R|/A.foo|() } ) } public final fun test_2(a: R|A|): R|kotlin/Unit| { R|/myWith|(R|/a|, = myWith@fun R|A|.(): R|kotlin/Unit| { - this@R|/A|.R|/A.foo|() + this@R|special/anonymous|.R|/A.foo|() } ) } public final fun test_3(a: R|A|): R|kotlin/Unit| { R|/a|.R|/myApply|( = myApply@fun R|A|.(): R|kotlin/Unit| { - this@R|/A|.R|/A.foo|() + this@R|special/anonymous|.R|/A.foo|() } ) } @@ -33,7 +33,7 @@ FILE: lambdaWithReceiver.kt } public final fun test_4(): R|kotlin/Unit| { R|/complexLambda|( = complexLambda@fun R|kotlin/Int|.(it: R|kotlin/String|): R|kotlin/Unit| { - this@R|kotlin/Int|.R|kotlin/Int.inc|() + this@R|special/anonymous|.R|kotlin/Int.inc|() this@R|special/anonymous|.R|kotlin/Int.inc|() R|/it|.R|kotlin/String.length| } diff --git a/compiler/fir/resolve/testData/resolve/expresssions/localInnerClass.txt b/compiler/fir/resolve/testData/resolve/expresssions/localInnerClass.txt index 65760d5db72..e03d6bc938c 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/localInnerClass.txt +++ b/compiler/fir/resolve/testData/resolve/expresssions/localInnerClass.txt @@ -8,7 +8,7 @@ FILE: localInnerClass.kt } public final fun foo(): R|Foo| { - ^foo R|/.Derived.Derived|(Int(42)) + ^foo this@R|/anonymous|.R|/.Derived.Derived|(Int(42)) } local final inner class Derived : R|Foo| { diff --git a/compiler/fir/resolve/testData/resolve/expresssions/localWithBooleanNot.txt b/compiler/fir/resolve/testData/resolve/expresssions/localWithBooleanNot.txt index a5278158304..30a972a20e5 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/localWithBooleanNot.txt +++ b/compiler/fir/resolve/testData/resolve/expresssions/localWithBooleanNot.txt @@ -10,11 +10,11 @@ FILE: foo.kt private set(value: R|kotlin/Boolean|): R|kotlin/Unit| public final fun bar(): R|kotlin/Boolean| { - ^bar R|/anonymous.result|.R|kotlin/Boolean.not|() + ^bar this@R|/anonymous|.R|/anonymous.result|.R|kotlin/Boolean.not|() } public final override fun result(): R|kotlin/Boolean| { - ^result R|/anonymous.result| + ^result this@R|/anonymous|.R|/anonymous.result| } } diff --git a/compiler/fir/resolve/testData/resolve/expresssions/outerObject.txt b/compiler/fir/resolve/testData/resolve/expresssions/outerObject.txt index 90a58eb9711..38a77e90c5c 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/outerObject.txt +++ b/compiler/fir/resolve/testData/resolve/expresssions/outerObject.txt @@ -15,11 +15,11 @@ FILE: outerObject.kt super() } - public final val y: R|kotlin/Int| = this@R|/Outer|.R|/Outer.x| + public final val y: R|kotlin/Int| = R|/Outer.x| public get(): R|kotlin/Int| public final fun test(): R|kotlin/Unit| { - (this@R|/Outer|, this@R|/Outer.Nested|).R|/Outer.foo|() + this@R|/Outer.Nested|.R|/Outer.foo|() } } diff --git a/compiler/fir/resolve/testData/resolve/expresssions/privateVisibility.txt b/compiler/fir/resolve/testData/resolve/expresssions/privateVisibility.txt index 3069b0e65cf..632ddd07027 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/privateVisibility.txt +++ b/compiler/fir/resolve/testData/resolve/expresssions/privateVisibility.txt @@ -11,8 +11,8 @@ FILE: first.kt public final fun baz(): R|kotlin/Unit| { this@R|/Private|.R|/Private.bar|() - R|/Private.Nested.Nested|() - this@R|/Private.Companion|.R|/Private.Companion.fromCompanion|() + this@R|/Private|.R|/Private.Nested.Nested|() + R|/Private.Companion.fromCompanion|() Q|Private.NotCompanion|.#() } @@ -23,7 +23,7 @@ FILE: first.kt public final fun foo(): R|kotlin/Unit| { this@R|/Private|.R|/Private.bar|() - this@R|/Private.Companion|.R|/Private.Companion.fromCompanion|() + R|/Private.Companion.fromCompanion|() Q|Private.NotCompanion|.#() } @@ -35,7 +35,7 @@ FILE: first.kt } public final fun foo(): R|kotlin/Unit| { - this@R|/Private.Companion|.R|/Private.Companion.fromCompanion|() + R|/Private.Companion.fromCompanion|() Q|Private.NotCompanion|.#() } @@ -72,7 +72,7 @@ FILE: first.kt public final fun baz(): R|kotlin/Unit| { R|/Local.bar|() - R|/Local.Inner.Inner|() + this@R|/Local|.R|/Local.Inner.Inner|() } local final inner class Inner : R|kotlin/Any| { diff --git a/compiler/fir/resolve/testData/resolve/expresssions/protectedVisibility.txt b/compiler/fir/resolve/testData/resolve/expresssions/protectedVisibility.txt index f9bdc7cc744..2e334e3731e 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/protectedVisibility.txt +++ b/compiler/fir/resolve/testData/resolve/expresssions/protectedVisibility.txt @@ -9,7 +9,7 @@ FILE: protectedVisibility.kt public final fun baz(): R|kotlin/Unit| { this@R|/Protected|.R|/Protected.bar|() - R|/Protected.Nested.Nested|().R|/Protected.Nested.foo|() + this@R|/Protected|.R|/Protected.Nested.Nested|().R|/Protected.Nested.foo|() } public final inner class Inner : R|kotlin/Any| { @@ -57,10 +57,10 @@ FILE: protectedVisibility.kt } public final fun foo(): R|kotlin/Unit| { - this@R|/Protected|.R|/Protected.bar|() - R|/Protected.Nested.Nested|().R|/Protected.Nested.foo|() - R|/Protected.Nested.Nested|().#() - this@R|/Protected.Companion|.R|/Protected.Companion.fromCompanion|() + this@R|/Derived|.R|/Protected.bar|() + this@R|/Derived|.R|/Protected.Nested.Nested|().R|/Protected.Nested.foo|() + this@R|/Derived|.R|/Protected.Nested.Nested|().#() + R|/Protected.Companion.fromCompanion|() #() } @@ -70,7 +70,7 @@ FILE: protectedVisibility.kt } public final fun use(): R|kotlin/Unit| { - this@R|/Protected.Nested|.R|/Protected.Nested.bar|() + this@R|/Derived.NestedDerived|.R|/Protected.Nested.bar|() } } diff --git a/compiler/fir/resolve/testData/resolve/expresssions/receiverConsistency.kt b/compiler/fir/resolve/testData/resolve/expresssions/receiverConsistency.kt index 714ba2fcbc1..13e05010555 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/receiverConsistency.kt +++ b/compiler/fir/resolve/testData/resolve/expresssions/receiverConsistency.kt @@ -6,7 +6,7 @@ class C { class Nested { fun test() { - err() + err() } } } diff --git a/compiler/fir/resolve/testData/resolve/expresssions/receiverConsistency.txt b/compiler/fir/resolve/testData/resolve/expresssions/receiverConsistency.txt index 59c45cc154d..10391b82a6e 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/receiverConsistency.txt +++ b/compiler/fir/resolve/testData/resolve/expresssions/receiverConsistency.txt @@ -18,7 +18,7 @@ FILE: receiverConsistency.kt } public final fun test(): R|kotlin/Unit| { - #() + R|/C.err|() } } diff --git a/compiler/fir/resolve/testData/resolve/fromBuilder/enums.txt b/compiler/fir/resolve/testData/resolve/fromBuilder/enums.txt index 8c3c052a2f6..fc5c658517b 100644 --- a/compiler/fir/resolve/testData/resolve/fromBuilder/enums.txt +++ b/compiler/fir/resolve/testData/resolve/fromBuilder/enums.txt @@ -76,7 +76,7 @@ FILE: enums.kt } - public final val g: R|kotlin/Double| = this@R|/Planet.Companion|.R|/Planet.Companion.G|.R|kotlin/Double.times|(R|/m|).R|kotlin/Double.div|(R|/r|.R|kotlin/Double.times|(R|/r|)) + public final val g: R|kotlin/Double| = R|/Planet.Companion.G|.R|kotlin/Double.times|(R|/m|).R|kotlin/Double.div|(R|/r|.R|kotlin/Double.times|(R|/r|)) public get(): R|kotlin/Double| public abstract fun sayHello(): R|kotlin/Unit| diff --git a/compiler/fir/resolve/testData/resolve/genericConstructors.txt b/compiler/fir/resolve/testData/resolve/genericConstructors.txt index 1a5cf514c2f..a670b141f91 100644 --- a/compiler/fir/resolve/testData/resolve/genericConstructors.txt +++ b/compiler/fir/resolve/testData/resolve/genericConstructors.txt @@ -30,7 +30,7 @@ FILE: genericConstructors.kt } public final fun bar(): R|kotlin/Unit| { - this@R|/B|.R|FakeOverride|>|.R|FakeOverride|(String()) + this@R|/C|.R|FakeOverride|>|.R|FakeOverride|(String()) } } diff --git a/compiler/fir/resolve/testData/resolve/localObject.txt b/compiler/fir/resolve/testData/resolve/localObject.txt index 87c1b98e1e2..31e0e253b42 100644 --- a/compiler/fir/resolve/testData/resolve/localObject.txt +++ b/compiler/fir/resolve/testData/resolve/localObject.txt @@ -45,7 +45,7 @@ FILE: localObject.kt } - this@R|/TestProperty|.F|/TestProperty.x| = R|/value| + F|/TestProperty.x| = R|/value| } public final val y: R|kotlin/Int| diff --git a/compiler/fir/resolve/testData/resolve/multifile/importFromObject.txt b/compiler/fir/resolve/testData/resolve/multifile/importFromObject.txt index aa136bbd26f..19ae59180c4 100644 --- a/compiler/fir/resolve/testData/resolve/multifile/importFromObject.txt +++ b/compiler/fir/resolve/testData/resolve/multifile/importFromObject.txt @@ -10,5 +10,5 @@ FILE: a.kt } FILE: b.kt public final fun bar(): R|kotlin/Unit| { - this@R|a/A|.R|a/A.foo|() + R|a/A.foo|() } diff --git a/compiler/fir/resolve/testData/resolve/nested/inner.txt b/compiler/fir/resolve/testData/resolve/nested/inner.txt index d4e4e9db0d8..85dbfd9adbe 100644 --- a/compiler/fir/resolve/testData/resolve/nested/inner.txt +++ b/compiler/fir/resolve/testData/resolve/nested/inner.txt @@ -10,7 +10,7 @@ FILE: inner.kt } public final fun bar(): R|kotlin/Unit| { - lval i: R|Owner.Inner| = R|/Owner.Inner.Inner|() + lval i: R|Owner.Inner| = this@R|/Owner|.R|/Owner.Inner.Inner|() R|/i|.R|/Owner.Inner.baz|() } diff --git a/compiler/fir/resolve/testData/resolve/nested/simple.kt b/compiler/fir/resolve/testData/resolve/nested/simple.kt index a42556effec..6a3bb45f1ca 100644 --- a/compiler/fir/resolve/testData/resolve/nested/simple.kt +++ b/compiler/fir/resolve/testData/resolve/nested/simple.kt @@ -22,7 +22,7 @@ class Owner { } fun err() { - foo() + foo() this.foo() } } diff --git a/compiler/fir/resolve/testData/resolve/nested/simple.txt b/compiler/fir/resolve/testData/resolve/nested/simple.txt index 88a102e31e5..8387d032c5b 100644 --- a/compiler/fir/resolve/testData/resolve/nested/simple.txt +++ b/compiler/fir/resolve/testData/resolve/nested/simple.txt @@ -10,7 +10,7 @@ FILE: simple.kt } public final fun bar(): R|kotlin/Unit| { - lval n: R|Owner.Nested| = R|/Owner.Nested.Nested|() + lval n: R|Owner.Nested| = this@R|/Owner|.R|/Owner.Nested.Nested|() R|/n|.R|/Owner.Nested.baz|() } @@ -30,7 +30,7 @@ FILE: simple.kt } public final fun err(): R|kotlin/Unit| { - #() + R|/Owner.foo|() this@R|/Owner.Nested|.#() } diff --git a/compiler/fir/resolve/testData/resolve/nestedClassNameClash.txt b/compiler/fir/resolve/testData/resolve/nestedClassNameClash.txt index 53fdcb8cdae..751dac1b420 100644 --- a/compiler/fir/resolve/testData/resolve/nestedClassNameClash.txt +++ b/compiler/fir/resolve/testData/resolve/nestedClassNameClash.txt @@ -40,12 +40,12 @@ FILE: nestedClassNameClash.kt } public final fun test_5(): R|kotlin/Unit| { - lval result: R|Foo.Result| = R|/Foo.Result.Result|() + lval result: R|Foo.Result| = this@R|/Foo|.R|/Foo.Result.Result|() this@R|/Foo|.R|/Foo.saveResult|(R|/result|) } private final fun getResult(): R|Foo.Result| { - ^getResult R|/Foo.Result.Result|() + ^getResult this@R|/Foo|.R|/Foo.Result.Result|() } private final fun saveResults(results: R|kotlin/collections/List|): R|kotlin/Unit| { diff --git a/compiler/fir/resolve/testData/resolve/nestedReturnType.txt b/compiler/fir/resolve/testData/resolve/nestedReturnType.txt index 16ae9f2e92e..7fb9c5362ea 100644 --- a/compiler/fir/resolve/testData/resolve/nestedReturnType.txt +++ b/compiler/fir/resolve/testData/resolve/nestedReturnType.txt @@ -12,7 +12,7 @@ FILE: nestedReturnType.kt } public final fun foo(): R|Some.Nested| { - ^foo R|/Some.Nested.Nested|() + ^foo this@R|/Some|.R|/Some.Nested.Nested|() } } diff --git a/compiler/fir/resolve/testData/resolve/overrides/protobufExt.txt b/compiler/fir/resolve/testData/resolve/overrides/protobufExt.txt index 252522dec22..47019662d3c 100644 --- a/compiler/fir/resolve/testData/resolve/overrides/protobufExt.txt +++ b/compiler/fir/resolve/testData/resolve/overrides/protobufExt.txt @@ -18,7 +18,7 @@ FILE: protobufExt.kt } public final fun |, T> R|Message|.extF(e: R|Ext|): R|T| { - ^extF this@R|/Message|.R|FakeOverride|(R|/e|) + ^extF this@R|/extF|.R|FakeOverride|(R|/e|) } public final fun foo(m: R|MyMessage|, e: R|MyExt|): R|kotlin/Unit| { R|/m|.R|FakeOverride|(R|/e|) diff --git a/compiler/fir/resolve/testData/resolve/overrides/simpleFakeOverride.txt b/compiler/fir/resolve/testData/resolve/overrides/simpleFakeOverride.txt index 52f0f83eecc..f6b858a9a52 100644 --- a/compiler/fir/resolve/testData/resolve/overrides/simpleFakeOverride.txt +++ b/compiler/fir/resolve/testData/resolve/overrides/simpleFakeOverride.txt @@ -21,7 +21,7 @@ FILE: simpleFakeOverride.kt } public final fun test(): R|kotlin/Unit| { - this@R|/A|.R|FakeOverride|(R|/Some.Some|()) + this@R|/B|.R|FakeOverride|(R|/Some.Some|()) } } diff --git a/compiler/fir/resolve/testData/resolve/overrides/three.txt b/compiler/fir/resolve/testData/resolve/overrides/three.txt index 5994fc2d1a0..3c38153560f 100644 --- a/compiler/fir/resolve/testData/resolve/overrides/three.txt +++ b/compiler/fir/resolve/testData/resolve/overrides/three.txt @@ -19,8 +19,8 @@ FILE: three.kt } public final fun bar(): R|kotlin/Unit| { - this@R|/A|.R|/A.foo|() - this@R|/Y|.R|/Y.baz|() + this@R|/B|.R|/A.foo|() + this@R|/B|.R|/Y.baz|() } } @@ -30,9 +30,9 @@ FILE: three.kt } public final fun test(): R|kotlin/Unit| { - this@R|/A|.R|/A.foo|() - this@R|/B|.R|/B.bar|() - this@R|/Y|.R|/Y.baz|() + this@R|/C|.R|/A.foo|() + this@R|/C|.R|/B.bar|() + this@R|/C|.R|/Y.baz|() } } diff --git a/compiler/fir/resolve/testData/resolve/problems/localFunctionsHiding.txt b/compiler/fir/resolve/testData/resolve/problems/localFunctionsHiding.txt index 3b2a5e86ef5..9febcd7281e 100644 --- a/compiler/fir/resolve/testData/resolve/problems/localFunctionsHiding.txt +++ b/compiler/fir/resolve/testData/resolve/problems/localFunctionsHiding.txt @@ -10,7 +10,7 @@ FILE: localFunctionsHiding.kt } local final fun R|A|.transform(): R|kotlin/Int| { - ^transform this@R|/A|.R|/A.x|./transform]>#() + ^transform this@R|/transform|.R|/A.x|./transform]>#() } lval y: R|kotlin/Int| = Int(1) @@ -22,7 +22,7 @@ FILE: localFunctionsHiding.kt } local final fun R|A|.transformX(): R|kotlin/Int| { - ^transformX this@R|/A|.R|/A.x|.R|/transform|() + ^transformX this@R|/transformX|.R|/A.x|.R|/transform|() } lval y: R|kotlin/Int| = Int(1) diff --git a/compiler/fir/resolve/testData/resolve/problems/nestedClassContructor.txt b/compiler/fir/resolve/testData/resolve/problems/nestedClassContructor.txt index 0c47ccc57b1..05d7d037077 100644 --- a/compiler/fir/resolve/testData/resolve/problems/nestedClassContructor.txt +++ b/compiler/fir/resolve/testData/resolve/problems/nestedClassContructor.txt @@ -10,7 +10,7 @@ FILE: nestedClassContructor.kt } public final fun copy(): R|A.B| { - ^copy R|/A.B.B|() + ^copy this@R|/A.B|.R|/A.B.B|() } } @@ -46,7 +46,7 @@ FILE: nestedClassContructor.kt public final fun foo(): R|kotlin/Unit| { lval a: R|A| = R|/A.A|() - lval c: R|A.C| = R|/A.C.C|() + lval c: R|A.C| = this@R|/E|.R|/A.C.C|() } } diff --git a/compiler/fir/resolve/testData/resolve/recursiveCallOnWhenWithSealedClass.txt b/compiler/fir/resolve/testData/resolve/recursiveCallOnWhenWithSealedClass.txt index 31543588203..c1a52077e51 100644 --- a/compiler/fir/resolve/testData/resolve/recursiveCallOnWhenWithSealedClass.txt +++ b/compiler/fir/resolve/testData/resolve/recursiveCallOnWhenWithSealedClass.txt @@ -33,7 +33,7 @@ FILE: recursiveCallOnWhenWithSealedClass.kt throw R|java/lang/Exception.Exception|(String()) } ($subj$ is R|Maybe.Yeah|) -> { - this@R|/Maybe.Yeah|.R|/Maybe.Yeah.meat| + this@R|/Maybe|.R|/Maybe.Yeah.meat| } } diff --git a/compiler/fir/resolve/testData/resolve/references/superMember.txt b/compiler/fir/resolve/testData/resolve/references/superMember.txt index e90907cbdc2..e26b42661c1 100644 --- a/compiler/fir/resolve/testData/resolve/references/superMember.txt +++ b/compiler/fir/resolve/testData/resolve/references/superMember.txt @@ -14,7 +14,7 @@ FILE: superMember.kt } public final fun bar(): R|kotlin/Unit| { - this@R|/A|.R|/A.foo|() + this@R|/B|.R|/A.foo|() } } diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/implicitReceiverAsWhenSubject.dot b/compiler/fir/resolve/testData/resolve/smartcasts/implicitReceiverAsWhenSubject.dot index a671e9c1016..a627642fb24 100644 --- a/compiler/fir/resolve/testData/resolve/smartcasts/implicitReceiverAsWhenSubject.dot +++ b/compiler/fir/resolve/testData/resolve/smartcasts/implicitReceiverAsWhenSubject.dot @@ -59,7 +59,7 @@ digraph implicitReceiverAsWhenSubject_kt { this@R|/test_1|.R|kotlin/collections/List.size| } ($subj$ is R|kotlin/String|) -> { - this@R|kotlin/String|.R|kotlin/String.length| + this@R|/test_1|.R|kotlin/String.length| } else -> { Int(0) @@ -165,7 +165,7 @@ digraph implicitReceiverAsWhenSubject_kt { } ($subj$ is R|kotlin/String|) -> { R|/x|.R|kotlin/String.length| - this@R|kotlin/String|.R|kotlin/String.length| + this@R|/test_2|.R|kotlin/String.length| } else -> { Int(0) diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/implicitReceiverAsWhenSubject.txt b/compiler/fir/resolve/testData/resolve/smartcasts/implicitReceiverAsWhenSubject.txt index b8d1b2b14fd..36af96ef981 100644 --- a/compiler/fir/resolve/testData/resolve/smartcasts/implicitReceiverAsWhenSubject.txt +++ b/compiler/fir/resolve/testData/resolve/smartcasts/implicitReceiverAsWhenSubject.txt @@ -5,7 +5,7 @@ FILE: implicitReceiverAsWhenSubject.kt this@R|/test_1|.R|kotlin/collections/List.size| } ($subj$ is R|kotlin/String|) -> { - this@R|kotlin/String|.R|kotlin/String.length| + this@R|/test_1|.R|kotlin/String.length| } else -> { Int(0) @@ -21,7 +21,7 @@ FILE: implicitReceiverAsWhenSubject.kt } ($subj$ is R|kotlin/String|) -> { R|/x|.R|kotlin/String.length| - this@R|kotlin/String|.R|kotlin/String.length| + this@R|/test_2|.R|kotlin/String.length| } else -> { Int(0) diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/implicitReceivers.dot b/compiler/fir/resolve/testData/resolve/smartcasts/implicitReceivers.dot index f6e517d9e9d..6bebfb832f3 100644 --- a/compiler/fir/resolve/testData/resolve/smartcasts/implicitReceivers.dot +++ b/compiler/fir/resolve/testData/resolve/smartcasts/implicitReceivers.dot @@ -77,7 +77,7 @@ digraph implicitReceivers_kt { 26 [label="Enter block"]; 27 [label="Access variable this@R|/test_1|"]; 28 [label="Function call: this@R|/test_1|.R|/A.foo|()"]; - 29 [label="Function call: this@R|/A|.R|/A.foo|()"]; + 29 [label="Function call: this@R|/test_1|.R|/A.foo|()"]; 30 [label="Exit block"]; } 31 [label="Exit when branch result"]; @@ -140,7 +140,7 @@ digraph implicitReceivers_kt { 46 [label="Enter block"]; 47 [label="Access variable this@R|/test_2|"]; 48 [label="Function call: this@R|/test_2|.R|/A.foo|()"]; - 49 [label="Function call: this@R|/A|.R|/A.foo|()"]; + 49 [label="Function call: this@R|/test_2|.R|/A.foo|()"]; 50 [label="Exit block"]; } 51 [label="Exit when branch result"]; @@ -208,29 +208,29 @@ digraph implicitReceivers_kt { 72 [label="Type operator: this@wb as A"]; 73 [label="Access variable this@R|special/anonymous|"]; 74 [label="Function call: this@R|special/anonymous|.R|/A.foo|()"]; - 75 [label="Function call: this@R|/A|.R|/A.foo|()"]; + 75 [label="Function call: this@R|special/anonymous|.R|/A.foo|()"]; 76 [label="Exit function anonymousFunction"]; } 77 [label="Function call: R|kotlin/with|(R|/c|, = wc@fun R|kotlin/Any|.(): R|kotlin/Unit| { (this@R|special/anonymous| as R|A|) this@R|special/anonymous|.R|/A.foo|() - this@R|/A|.R|/A.foo|() + this@R|special/anonymous|.R|/A.foo|() } )"]; 78 [label="Access variable this@R|special/anonymous|"]; 79 [label="Function call: this@R|special/anonymous|.R|/A.foo|()"]; - 80 [label="Function call: this@R|/A|.R|/A.foo|()"]; + 80 [label="Function call: this@R|special/anonymous|.R|/A.foo|()"]; 81 [label="Exit function anonymousFunction"]; } 82 [label="Function call: R|kotlin/with|(R|/b|, = wb@fun R|kotlin/Any|.(): R|kotlin/Unit| { R|kotlin/with|(R|/c|, = wc@fun R|kotlin/Any|.(): R|kotlin/Unit| { (this@R|special/anonymous| as R|A|) this@R|special/anonymous|.R|/A.foo|() - this@R|/A|.R|/A.foo|() + this@R|special/anonymous|.R|/A.foo|() } ) this@R|special/anonymous|.R|/A.foo|() - this@R|/A|.R|/A.foo|() + this@R|special/anonymous|.R|/A.foo|() } )"]; 83 [label="Exit function anonymousFunction"]; @@ -240,11 +240,11 @@ digraph implicitReceivers_kt { R|kotlin/with|(R|/c|, = wc@fun R|kotlin/Any|.(): R|kotlin/Unit| { (this@R|special/anonymous| as R|A|) this@R|special/anonymous|.R|/A.foo|() - this@R|/A|.R|/A.foo|() + this@R|special/anonymous|.R|/A.foo|() } ) this@R|special/anonymous|.R|/A.foo|() - this@R|/A|.R|/A.foo|() + this@R|special/anonymous|.R|/A.foo|() } ) } @@ -317,10 +317,10 @@ digraph implicitReceivers_kt { 104 [label="Enter block"]; 105 [label="Access variable this@R|/test_4|"]; 106 [label="Function call: this@R|/test_4|.R|/A.foo|()"]; - 107 [label="Function call: this@R|/A|.R|/A.foo|()"]; + 107 [label="Function call: this@R|/test_4|.R|/A.foo|()"]; 108 [label="Access variable this@R|/test_4|"]; 109 [label="Function call: this@R|/test_4|.R|/B.bar|()"]; - 110 [label="Function call: this@R|/B|.R|/B.bar|()"]; + 110 [label="Function call: this@R|/test_4|.R|/B.bar|()"]; 111 [label="Exit block"]; } 112 [label="Exit when branch result"]; @@ -333,7 +333,7 @@ digraph implicitReceivers_kt { 117 [label="Function call: #()"]; 118 [label="Access variable this@R|/test_4|"]; 119 [label="Function call: this@R|/test_4|.R|/A.foo|()"]; - 120 [label="Function call: this@R|/A|.R|/A.foo|()"]; + 120 [label="Function call: this@R|/test_4|.R|/A.foo|()"]; 121 [label="Exit block"]; } 122 [label="Exit when branch result"]; @@ -477,10 +477,10 @@ digraph implicitReceivers_kt { } 172 [label="Jump: ^test_5 when () { (this@R|/test_5| is R|kotlin/collections/List<*>|) -> { - this@R|kotlin/collections/List|.R|kotlin/collections/List.size| + this@R|/test_5|.R|kotlin/collections/List.size| } (this@R|/test_5| is R|kotlin/String|) -> { - this@R|kotlin/String|.R|kotlin/String.length| + this@R|/test_5|.R|kotlin/String.length| } else -> { Int(0) diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/implicitReceivers.txt b/compiler/fir/resolve/testData/resolve/smartcasts/implicitReceivers.txt index 765b52656a6..33966b98638 100644 --- a/compiler/fir/resolve/testData/resolve/smartcasts/implicitReceivers.txt +++ b/compiler/fir/resolve/testData/resolve/smartcasts/implicitReceivers.txt @@ -23,7 +23,7 @@ FILE: implicitReceivers.kt when () { (this@R|/test_1| is R|A|) -> { this@R|/test_1|.R|/A.foo|() - this@R|/A|.R|/A.foo|() + this@R|/test_1|.R|/A.foo|() } else -> { this@R|/test_1|.#() @@ -42,7 +42,7 @@ FILE: implicitReceivers.kt } else -> { this@R|/test_2|.R|/A.foo|() - this@R|/A|.R|/A.foo|() + this@R|/test_2|.R|/A.foo|() } } @@ -55,11 +55,11 @@ FILE: implicitReceivers.kt R|kotlin/with|(R|/c|, = wc@fun R|kotlin/Any|.(): R|kotlin/Unit| { (this@R|special/anonymous| as R|A|) this@R|special/anonymous|.R|/A.foo|() - this@R|/A|.R|/A.foo|() + this@R|special/anonymous|.R|/A.foo|() } ) this@R|special/anonymous|.R|/A.foo|() - this@R|/A|.R|/A.foo|() + this@R|special/anonymous|.R|/A.foo|() } ) } @@ -79,13 +79,13 @@ FILE: implicitReceivers.kt this@R|/test_4|.#() #() this@R|/test_4|.R|/A.foo|() - this@R|/A|.R|/A.foo|() + this@R|/test_4|.R|/A.foo|() } else -> { this@R|/test_4|.R|/A.foo|() - this@R|/A|.R|/A.foo|() + this@R|/test_4|.R|/A.foo|() + this@R|/test_4|.R|/B.bar|() this@R|/test_4|.R|/B.bar|() - this@R|/B|.R|/B.bar|() } } @@ -100,10 +100,10 @@ FILE: implicitReceivers.kt public final fun R|kotlin/Any|.test_5(): R|kotlin/Int| { ^test_5 when () { (this@R|/test_5| is R|kotlin/collections/List<*>|) -> { - this@R|kotlin/collections/List|.R|kotlin/collections/List.size| + this@R|/test_5|.R|kotlin/collections/List.size| } (this@R|/test_5| is R|kotlin/String|) -> { - this@R|kotlin/String|.R|kotlin/String.length| + this@R|/test_5|.R|kotlin/String.length| } else -> { Int(0) @@ -113,7 +113,7 @@ FILE: implicitReceivers.kt } public final fun R|kotlin/Any|.test_6(): R|kotlin/Unit| { (this@R|/test_6| as R|kotlin/collections/List<*>|) - this@R|kotlin/collections/List|.R|kotlin/collections/List.size| + this@R|/test_6|.R|kotlin/collections/List.size| (this@R|/test_6| as R|kotlin/String|) - this@R|kotlin/String|.R|kotlin/String.length| + this@R|/test_6|.R|kotlin/String.length| } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/addAllOnJavaCollection.txt b/compiler/fir/resolve/testData/resolve/stdlib/addAllOnJavaCollection.txt index f6ba06b724f..5d7b3d9ea0f 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/addAllOnJavaCollection.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/addAllOnJavaCollection.txt @@ -2,7 +2,7 @@ FILE: addAllOnJavaCollection.kt public final fun foo(): R|kotlin/Unit| { lval y: R|kotlin/collections/List| = R|kotlin/collections/listOf|(String(Alpha), String(Beta)) lval x: R|java/util/LinkedHashSet| = R|java/util/LinkedHashSet.LinkedHashSet|().R|kotlin/apply||>( = apply@fun R|java/util/LinkedHashSet|.(): R|kotlin/Unit| { - this@R|java/util/AbstractCollection|.R|FakeOverride|(R|/y|) + this@R|special/anonymous|.R|FakeOverride|(R|/y|) } ) lval z: R|java/util/ArrayList| = R|java/util/ArrayList.ArrayList|() diff --git a/compiler/fir/resolve/testData/resolve/stdlib/hashTableWithForEach.txt b/compiler/fir/resolve/testData/resolve/stdlib/hashTableWithForEach.txt index a730effbe3c..99b5969ae1e 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/hashTableWithForEach.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/hashTableWithForEach.txt @@ -15,7 +15,7 @@ FILE: hashTableWithForEach.kt R|/DEBUG| -> { ^ Q|java/util/Collections|.R|java/util/Collections.unmodifiableSet||>(R|kotlin/collections/mutableSetOf||>().R|kotlin/apply|>|>( = apply@fun R|kotlin/collections/MutableSet>|.(): R|kotlin/Unit| { this@R|/SomeHashTable|.R|FakeOverride|( = forEach@fun (key: R|K|, value: R|V|): R|kotlin/Unit| { - this@R|kotlin/collections/MutableSet|.R|FakeOverride|(R|/SomeHashTable.Entry.Entry|(R|/key|, R|/value|)) + this@R|special/anonymous|.R|FakeOverride|(this@R|/SomeHashTable|.R|/SomeHashTable.Entry.Entry|(R|/key|, R|/value|)) } ) } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/implicitReceiverOrder.txt b/compiler/fir/resolve/testData/resolve/stdlib/implicitReceiverOrder.txt index 9a91e1a774d..42c577e64e5 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/implicitReceiverOrder.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/implicitReceiverOrder.txt @@ -30,16 +30,16 @@ FILE: implicitReceiverOrder.kt public final fun test(a: R|A|, b: R|B|): R|kotlin/Unit| { R|kotlin/with|(R|/b|, = with@fun R|B|.(): R|kotlin/Int| { R|kotlin/with|(R|/a|, = with@fun R|A|.(): R|kotlin/Int| { - this@R|/A|.R|/A.foo|() - (this@R|/B|, this@R|special/anonymous|).R|/B.bar|() + this@R|special/anonymous|.R|/A.foo|() + this@R|special/anonymous|.R|/B.bar|() } ) } ) R|kotlin/with|(R|/a|, = with@fun R|A|.(): R|kotlin/Int| { R|kotlin/with|(R|/b|, = with@fun R|B|.(): R|kotlin/Int| { - this@R|/B|.R|/B.foo|() - (this@R|/A|, this@R|special/anonymous|).R|/A.bar|() + this@R|special/anonymous|.R|/B.foo|() + this@R|special/anonymous|.R|/A.bar|() } ) } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/j+k/FieldSubstitution.txt b/compiler/fir/resolve/testData/resolve/stdlib/j+k/FieldSubstitution.txt index a5a1acc2cac..8ee7b3356e1 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/j+k/FieldSubstitution.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/j+k/FieldSubstitution.txt @@ -5,7 +5,7 @@ FILE: Derived.kt } public final fun test(): R|kotlin/Unit| { - this@R|/JavaClass|.R|/JavaClass.myHost|.R|kotlin/String.length| + this@R|/Derived|.R|/JavaClass.myHost|.R|kotlin/String.length| } } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/j+k/JavaVisibility2.txt b/compiler/fir/resolve/testData/resolve/stdlib/j+k/JavaVisibility2.txt index 978a421101f..318dd730b1e 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/j+k/JavaVisibility2.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/j+k/JavaVisibility2.txt @@ -30,7 +30,7 @@ FILE: k.kt public final val p2: R|kotlin/Int| = Q|j/JavaProtected|.R|j/JavaProtected.javaPProtectedStatic| public get(): R|kotlin/Int| - public final val p3: R|kotlin/Int| = this@R|j/JavaProtected|.R|j/JavaProtected.javaPProtectedPackage| + public final val p3: R|kotlin/Int| = this@R|k/B|.R|j/JavaProtected.javaPProtectedPackage| public get(): R|kotlin/Int| public final fun test(): R|kotlin/Unit| { diff --git a/compiler/fir/resolve/testData/resolve/stdlib/j+k/KJKComplexHierarchy.txt b/compiler/fir/resolve/testData/resolve/stdlib/j+k/KJKComplexHierarchy.txt index 415260790a1..cbdd43497cf 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/j+k/KJKComplexHierarchy.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/j+k/KJKComplexHierarchy.txt @@ -5,10 +5,10 @@ FILE: K1.kt } public final fun bar(): R|kotlin/Unit| { - this@R|/KFirst|.R|/KFirst.foo|() - this@R|/J1|.R|/J1.baz|() - this@R|/SuperClass|.R|/SuperClass.superClass|() - this@R|/SuperI|.R|/SuperI.superI|() + this@R|/K2|.R|/KFirst.foo|() + this@R|/K2|.R|/J1.baz|() + this@R|/K2|.R|/SuperClass.superClass|() + this@R|/K2|.R|/SuperI.superI|() } } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/j+k/KJKInheritance.txt b/compiler/fir/resolve/testData/resolve/stdlib/j+k/KJKInheritance.txt index e29f1eeba3f..ac7141a95a1 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/j+k/KJKInheritance.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/j+k/KJKInheritance.txt @@ -15,8 +15,8 @@ FILE: K2.kt } public final fun bar(): R|kotlin/Unit| { - this@R|/KFirst|.R|/KFirst.foo|() - this@R|/J1|.R|/J1.baz|() + this@R|/K2|.R|/KFirst.foo|() + this@R|/K2|.R|/J1.baz|() } } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/j+k/KJKInheritanceGeneric.txt b/compiler/fir/resolve/testData/resolve/stdlib/j+k/KJKInheritanceGeneric.txt index 6a5328ff634..83ad5f0436f 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/j+k/KJKInheritanceGeneric.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/j+k/KJKInheritanceGeneric.txt @@ -16,8 +16,8 @@ FILE: K2.kt } public final fun bar(): R|kotlin/Unit| { - this@R|/KFirst|.R|FakeOverride|(Int(1)) - this@R|/J1|.R|/J1.baz|() + this@R|/K2|.R|FakeOverride|(Int(1)) + this@R|/K2|.R|/J1.baz|() } } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/j+k/MyIterable.txt b/compiler/fir/resolve/testData/resolve/stdlib/j+k/MyIterable.txt index 6290c2ff595..84c0407f2fe 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/j+k/MyIterable.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/j+k/MyIterable.txt @@ -1,8 +1,8 @@ FILE: test.kt public abstract interface UseIterable : R|MyIterable| { public open fun test(): R|kotlin/Unit| { - lval it: R|kotlin/collections/MutableIterator| = this@R|kotlin/collections/MutableIterable|.R|FakeOverride|>|() - lval split: R|java/util/Spliterator| = this@R|java/lang/Iterable|.R|FakeOverride|>|() + lval it: R|kotlin/collections/MutableIterator| = this@R|/UseIterable|.R|FakeOverride|>|() + lval split: R|java/util/Spliterator| = this@R|/UseIterable|.R|FakeOverride|>|() } } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/j+k/StaticClassConstructorFromBaseClass.txt b/compiler/fir/resolve/testData/resolve/stdlib/j+k/StaticClassConstructorFromBaseClass.txt index b69dd41a9f7..b8d96ef4b67 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/j+k/StaticClassConstructorFromBaseClass.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/j+k/StaticClassConstructorFromBaseClass.txt @@ -5,7 +5,7 @@ FILE: User.kt } public final fun foo(): R|kotlin/Unit| { - lval sc: R|AbstractClass.StaticClass| = R|/AbstractClass.StaticClass.StaticClass|() + lval sc: R|AbstractClass.StaticClass| = this@R|/User|.R|/AbstractClass.StaticClass.StaticClass|() } } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/j+k/SyntheticWithForEach.txt b/compiler/fir/resolve/testData/resolve/stdlib/j+k/SyntheticWithForEach.txt index fe200e0b0b5..cfe8c2eedef 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/j+k/SyntheticWithForEach.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/j+k/SyntheticWithForEach.txt @@ -1,11 +1,11 @@ FILE: test.kt public final fun R|Call|.testForEach(): R|kotlin/Unit| { - this@R|/Call|.R|/Call.arguments|.R|FakeOverride|( = forEach@fun (key: R|ft!|, value: R|ft!|): R|kotlin/Unit| { + this@R|/testForEach|.R|/Call.arguments|.R|FakeOverride|( = forEach@fun (key: R|ft!|, value: R|ft!|): R|kotlin/Unit| { R|/key|.R|kotlin/String.length| R|/value|.R|kotlin/String.length| } ) - this@R|/Call|.R|/Call.arguments|.R|kotlin/collections/forEach|!|, R|ft!|>( = forEach@fun (it: R|kotlin/collections/Map.Entry!, ft!>|): R|kotlin/Unit| { + this@R|/testForEach|.R|/Call.arguments|.R|kotlin/collections/forEach|!|, R|ft!|>( = forEach@fun (it: R|kotlin/collections/Map.Entry!, ft!>|): R|kotlin/Unit| { R|/it|.R|FakeOverride!|>|.R|kotlin/String.length| R|/it|.R|FakeOverride!|>|.R|kotlin/String.length| } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/j+k/outerInnerClasses.txt b/compiler/fir/resolve/testData/resolve/stdlib/j+k/outerInnerClasses.txt index 18d4979c34f..9d60095acb0 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/j+k/outerInnerClasses.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/j+k/outerInnerClasses.txt @@ -25,8 +25,8 @@ FILE: K2.kt } public final fun main(): R|kotlin/Unit| { - this@R|/KotlinOuter|.R|/KotlinOuter.bar|() - this@R|/J1|.R|/J1.baz|() + this@R|/K2|.R|/KotlinOuter.bar|() + this@R|/K2|.R|/J1.baz|() } public final inner class K3 : R|J1.J2| { @@ -35,10 +35,10 @@ FILE: K2.kt } public final fun main(): R|kotlin/Unit| { - this@R|/KotlinOuter.KotlinInner|.R|/KotlinOuter.KotlinInner.foo|() - this@R|/J1.J2|.R|/J1.J2.bazbaz|() - this@R|/KotlinOuter|.R|/KotlinOuter.bar|() - this@R|/J1|.R|/J1.baz|() + this@R|/K2.K3|.R|/KotlinOuter.KotlinInner.foo|() + this@R|/K2.K3|.R|/J1.J2.bazbaz|() + this@R|/K2|.R|/KotlinOuter.bar|() + this@R|/K2|.R|/J1.baz|() } } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/mapList.txt b/compiler/fir/resolve/testData/resolve/stdlib/mapList.txt index 63206c87984..a9a70b7651d 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/mapList.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/mapList.txt @@ -7,7 +7,7 @@ FILE: mapList.kt ) R|/u|.R|/applyX||>( = applyX@fun R|kotlin/collections/List|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|FakeOverride|(Int(1)) - this@R|kotlin/collections/List|.R|FakeOverride|(Int(1)) + this@R|special/anonymous|.R|FakeOverride|(Int(1)) } ) } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/multipleImplicitReceivers.txt b/compiler/fir/resolve/testData/resolve/stdlib/multipleImplicitReceivers.txt index 96a923bd9d7..a64b6b2d2d7 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/multipleImplicitReceivers.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/multipleImplicitReceivers.txt @@ -27,9 +27,9 @@ FILE: multipleImplicitReceivers.kt public final fun test(fooImpl: R|IFoo|, invokeImpl: R|IInvoke|): R|kotlin/Unit| { R|kotlin/with|(Q|A|, = with@fun R|A|.(): R|kotlin/Int| { R|kotlin/with|(R|/fooImpl|, = with@fun R|IFoo|.(): R|kotlin/Int| { - (this@R|/IFoo|, this@R|special/anonymous|).R|/IFoo.foo| + this@R|special/anonymous|.R|/IFoo.foo| R|kotlin/with|(R|/invokeImpl|, = with@fun R|IInvoke|.(): R|kotlin/Int| { - (this@R|/IInvoke|, (this@R|/IFoo|, this@R|special/anonymous|).R|/IFoo.foo|).R|/IInvoke.invoke|() + (this@R|special/anonymous|, this@R|special/anonymous|.R|/IFoo.foo|).R|/IInvoke.invoke|() } ) } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/problems.txt b/compiler/fir/resolve/testData/resolve/stdlib/problems.txt index bef1f816905..57acb464bee 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/problems.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/problems.txt @@ -10,7 +10,7 @@ FILE: problems.kt public get(): R|kotlin/String| public final fun test(): R|kotlin/Unit| { - R|/anonymous.name| + this@R|/anonymous|.R|/anonymous.name| } } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/topLevelResolve.txt b/compiler/fir/resolve/testData/resolve/stdlib/topLevelResolve.txt index 73ccc6557ab..37a4253e928 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/topLevelResolve.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/topLevelResolve.txt @@ -45,7 +45,7 @@ FILE: topLevelResolve.kt } public final fun testWith(): R|kotlin/Unit| { lval length: R|kotlin/Int| = R|kotlin/with|(String(), = with@fun R|kotlin/String|.(): R|kotlin/Int| { - this@R|kotlin/String|.R|kotlin/String.length| + this@R|special/anonymous|.R|kotlin/String.length| } ) lval indices: R|kotlin/ranges/IntRange| = R|kotlin/with|(String(), = with@fun R|kotlin/String|.(): R|kotlin/ranges/IntRange| { diff --git a/compiler/fir/resolve/testData/resolve/stdlib/typeParameterDerived.txt b/compiler/fir/resolve/testData/resolve/stdlib/typeParameterDerived.txt index f7e5755cf01..fbb94424f68 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/typeParameterDerived.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/typeParameterDerived.txt @@ -1,10 +1,10 @@ FILE: typeParameterDerived.kt public final inline fun R|kotlin/collections/MutableMap|.getOrPut(key: R|K|, defaultValue: R|(K) -> VA|, postCompute: R|(VA) -> kotlin/Unit|): R|V| { - lval value: R|V?| = this@R|kotlin/collections/Map|.R|FakeOverride|(R|/key|) + lval value: R|V?| = this@R|/getOrPut|.R|FakeOverride|(R|/key|) ^getOrPut when () { ==(R|/value|, Null(null)) -> { lval answer: R|VA| = R|/defaultValue|.R|FakeOverride|(R|/key|) - this@R|kotlin/collections/MutableMap|.R|FakeOverride|(R|/key|, R|/answer|) + this@R|/getOrPut|.R|FakeOverride|(R|/key|, R|/answer|) R|/postCompute|.R|FakeOverride|(R|/answer|) R|/answer| } diff --git a/compiler/testData/codegen/box/extensionFunctions/kt1776.kt b/compiler/testData/codegen/box/extensionFunctions/kt1776.kt index 45ea95620fd..5174d4cc374 100644 --- a/compiler/testData/codegen/box/extensionFunctions/kt1776.kt +++ b/compiler/testData/codegen/box/extensionFunctions/kt1776.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR interface Expr { public fun ttFun() : Int = 12 } diff --git a/compiler/testData/codegen/box/innerNested/extensionToNested.kt b/compiler/testData/codegen/box/innerNested/extensionToNested.kt index 8ee52cee6e4..553ff99ae00 100644 --- a/compiler/testData/codegen/box/innerNested/extensionToNested.kt +++ b/compiler/testData/codegen/box/innerNested/extensionToNested.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class Test { class Nested { val value = "OK" diff --git a/compiler/testData/codegen/box/smartCasts/implicitExtensionReceiver.kt b/compiler/testData/codegen/box/smartCasts/implicitExtensionReceiver.kt index d2cef58995b..f315a202bdb 100644 --- a/compiler/testData/codegen/box/smartCasts/implicitExtensionReceiver.kt +++ b/compiler/testData/codegen/box/smartCasts/implicitExtensionReceiver.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class A { fun foo() = "OK" } diff --git a/compiler/testData/codegen/box/typeInfo/implicitSmartCastThis.kt b/compiler/testData/codegen/box/typeInfo/implicitSmartCastThis.kt index 36918e8bd09..a4587005887 100644 --- a/compiler/testData/codegen/box/typeInfo/implicitSmartCastThis.kt +++ b/compiler/testData/codegen/box/typeInfo/implicitSmartCastThis.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR open class A class B : A() { diff --git a/compiler/testData/diagnostics/tests/classObjects/ClassObjectCannotAccessClassFields.fir.kt b/compiler/testData/diagnostics/tests/classObjects/ClassObjectCannotAccessClassFields.fir.kt index a76c28aba66..6f5e7ff9794 100644 --- a/compiler/testData/diagnostics/tests/classObjects/ClassObjectCannotAccessClassFields.fir.kt +++ b/compiler/testData/diagnostics/tests/classObjects/ClassObjectCannotAccessClassFields.fir.kt @@ -4,6 +4,6 @@ class A() { val x = 1 companion object { - val y = x + val y = x } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/classObjects/resolveFunctionInsideClassObject.fir.kt b/compiler/testData/diagnostics/tests/classObjects/resolveFunctionInsideClassObject.fir.kt index 498426201be..3f4c5d1c00a 100644 --- a/compiler/testData/diagnostics/tests/classObjects/resolveFunctionInsideClassObject.fir.kt +++ b/compiler/testData/diagnostics/tests/classObjects/resolveFunctionInsideClassObject.fir.kt @@ -4,6 +4,6 @@ class Test { fun test(): Int = 12 companion object { - val a = test() // Check if resolver will be able to infer type of a variable + val a = test() // Check if resolver will be able to infer type of a variable } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/constructorConsistency/companion.fir.kt b/compiler/testData/diagnostics/tests/constructorConsistency/companion.fir.kt index 5b0313198a6..a32bd422020 100644 --- a/compiler/testData/diagnostics/tests/constructorConsistency/companion.fir.kt +++ b/compiler/testData/diagnostics/tests/constructorConsistency/companion.fir.kt @@ -8,7 +8,7 @@ class My { companion object { - val y = foo() + val y = foo() val u = bar() diff --git a/compiler/testData/diagnostics/tests/inline/nonPublicMember/localClass.fir.kt b/compiler/testData/diagnostics/tests/inline/nonPublicMember/localClass.fir.kt index 5f3c49341f1..bb947595277 100644 --- a/compiler/testData/diagnostics/tests/inline/nonPublicMember/localClass.fir.kt +++ b/compiler/testData/diagnostics/tests/inline/nonPublicMember/localClass.fir.kt @@ -7,7 +7,7 @@ public class Z { class Local { public inline fun a() { - privateProperty + privateProperty } } diff --git a/compiler/testData/diagnostics/tests/inner/enumEntries.fir.kt b/compiler/testData/diagnostics/tests/inner/enumEntries.fir.kt index dad79e88daa..7ff898c415a 100644 --- a/compiler/testData/diagnostics/tests/inner/enumEntries.fir.kt +++ b/compiler/testData/diagnostics/tests/inner/enumEntries.fir.kt @@ -1,6 +1,6 @@ enum class E { E1 { - override fun foo() = outerFun() + super.outerFun() + override fun foo() = outerFun() + super.outerFun() }, E2 { override fun foo() = E1.foo() diff --git a/compiler/testData/diagnostics/tests/inner/innerErrorForClassObjects.fir.kt b/compiler/testData/diagnostics/tests/inner/innerErrorForClassObjects.fir.kt index f91ff272ef0..26cc4552eae 100644 --- a/compiler/testData/diagnostics/tests/inner/innerErrorForClassObjects.fir.kt +++ b/compiler/testData/diagnostics/tests/inner/innerErrorForClassObjects.fir.kt @@ -12,8 +12,8 @@ class Test { fun more(): InnerClass { val b = InnerClass() - val testVal = inClass - foo() + val testVal = inClass + foo() return b } diff --git a/compiler/testData/diagnostics/tests/inner/innerErrorForObjects.fir.kt b/compiler/testData/diagnostics/tests/inner/innerErrorForObjects.fir.kt index 0e447b286f5..a768d51e1a0 100644 --- a/compiler/testData/diagnostics/tests/inner/innerErrorForObjects.fir.kt +++ b/compiler/testData/diagnostics/tests/inner/innerErrorForObjects.fir.kt @@ -12,8 +12,8 @@ class Test { fun more(): InnerClass { val b = InnerClass() - val testVal = inClass - foo() + val testVal = inClass + foo() return b } diff --git a/compiler/testData/diagnostics/tests/inner/localClass.fir.kt b/compiler/testData/diagnostics/tests/inner/localClass.fir.kt index 0745bfff026..2cf0bdc644e 100644 --- a/compiler/testData/diagnostics/tests/inner/localClass.fir.kt +++ b/compiler/testData/diagnostics/tests/inner/localClass.fir.kt @@ -3,10 +3,10 @@ class Outer { if (outerState > 0) return outerState class Local { - val localState = outerState + val localState = outerState inner class LocalInner { - val o = outerState + val o = outerState val l = localState } } diff --git a/compiler/testData/diagnostics/tests/inner/localClassInsideNested.fir.kt b/compiler/testData/diagnostics/tests/inner/localClassInsideNested.fir.kt index a7eefec3262..ef86abbccc1 100644 --- a/compiler/testData/diagnostics/tests/inner/localClassInsideNested.fir.kt +++ b/compiler/testData/diagnostics/tests/inner/localClassInsideNested.fir.kt @@ -2,7 +2,7 @@ class Outer { class Nested { fun foo() { class Local { - val state = outerState + val state = outerState } } } diff --git a/compiler/testData/diagnostics/tests/inner/nestedVsInnerAccessOuterMember.fir.kt b/compiler/testData/diagnostics/tests/inner/nestedVsInnerAccessOuterMember.fir.kt index e3806c9636d..ce056e37502 100644 --- a/compiler/testData/diagnostics/tests/inner/nestedVsInnerAccessOuterMember.fir.kt +++ b/compiler/testData/diagnostics/tests/inner/nestedVsInnerAccessOuterMember.fir.kt @@ -5,8 +5,8 @@ class Outer { val property = "" class Nested { - fun f() = function() - fun g() = property + fun f() = function() + fun g() = property fun h() = this@Outer.function() fun i() = this@Outer.property } diff --git a/compiler/testData/diagnostics/tests/inner/outerSuperClassMember.fir.kt b/compiler/testData/diagnostics/tests/inner/outerSuperClassMember.fir.kt index dae32f58c4f..01e06409fda 100644 --- a/compiler/testData/diagnostics/tests/inner/outerSuperClassMember.fir.kt +++ b/compiler/testData/diagnostics/tests/inner/outerSuperClassMember.fir.kt @@ -4,6 +4,6 @@ open class Base { class Derived : Base() { class Nested { - fun bar() = foo() + fun bar() = foo() } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/regressions/kt5362.fir.kt b/compiler/testData/diagnostics/tests/regressions/kt5362.fir.kt index bb381e210a5..052dedb2828 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt5362.fir.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt5362.fir.kt @@ -2,7 +2,7 @@ // KT-5362 Compiler crashes on access to extension method from nested class class Outer { class Nested{ - fun foo(s: String) = s.extension() + fun foo(s: String) = s.extension() } private fun String.extension(): String = this diff --git a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromContainingClass_after.fir.kt b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromContainingClass_after.fir.kt index 575ff4d1e43..8e5caf4cc7c 100644 --- a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromContainingClass_after.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromContainingClass_after.fir.kt @@ -29,8 +29,8 @@ open class A : J() { fun test() { foo() bar() - val a: Int = baz() - val b: T = baz() + val a: Int = baz() + val b: T = baz() } } diff --git a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromContainingClass_before.fir.kt b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromContainingClass_before.fir.kt index 940af0e53d3..ba4c3d8f877 100644 --- a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromContainingClass_before.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromContainingClass_before.fir.kt @@ -29,8 +29,8 @@ open class A : J() { fun test() { foo() bar() - val a: Int = baz() - val b: T = baz() + val a: Int = baz() + val b: T = baz() } } diff --git a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJavaAfterKotlin_after.fir.kt b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJavaAfterKotlin_after.fir.kt index 29a98ff0b90..29a0dc60b2c 100644 --- a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJavaAfterKotlin_after.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJavaAfterKotlin_after.fir.kt @@ -14,20 +14,20 @@ class A { init { foo() bar() - baz() + baz() } fun test1() { foo() bar() - baz() + baz() } object O { fun test() { foo() bar() - baz() + baz() } } diff --git a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJavaAfterKotlin_before.fir.kt b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJavaAfterKotlin_before.fir.kt index aee0230f1bd..f50853f8270 100644 --- a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJavaAfterKotlin_before.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJavaAfterKotlin_before.fir.kt @@ -14,20 +14,20 @@ class A { init { foo() bar() - baz() + baz() } fun test1() { foo() bar() - baz() + baz() } object O { fun test() { foo() bar() - baz() + baz() } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/CallCompanionProtectedNonStatic.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/CallCompanionProtectedNonStatic.fir.kt index a59b160ba0e..f01dce22d1f 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/CallCompanionProtectedNonStatic.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/CallCompanionProtectedNonStatic.fir.kt @@ -5,7 +5,7 @@ open class VeryBase { open class Base { protected fun foo() { bar() // Ok - baz() // Ok + baz() // Ok } inner class Inner { @@ -13,7 +13,7 @@ open class Base { foo() // Ok bar() // Ok gav() // Ok - baz() // Ok + baz() // Ok } } @@ -22,7 +22,7 @@ open class Base { foo() // Ok bar() // Ok gav() // Ok - baz() // Ok + baz() // Ok } } @@ -48,7 +48,7 @@ class Derived : Base() { foo() // Ok gav() // Ok bar() - baz() + baz() prop = 0 } @@ -57,7 +57,7 @@ class Derived : Base() { foo() // Ok gav() // Ok bar() - baz() + baz() prop = 0 } } @@ -66,7 +66,7 @@ class Derived : Base() { fun test2() { gav() // Ok bar() - baz() + baz() prop = 0 } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors2.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors2.fir.kt index a745898d565..a1d989f3161 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors2.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors2.fir.kt @@ -20,8 +20,8 @@ typealias CStr = JHost.Consumer typealias CStrList = JHost.Consumer> typealias C2 = JHost.Consumer2 -val test1 = R { } -val test2 = C { s -> println(s.length) } -val test3 = CStr { s -> println(s.length) } -val test4 = CStrList { ss -> for (s in ss) { println(s.length) } } -val test5 = C2 { a, b -> val x: Int = a + b; println(x)} +val test1 = R { } +val test2 = C { s -> println(s.length) } +val test3 = CStr { s -> println(s.length) } +val test4 = CStrList { ss -> for (s in ss) { println(s.length) } } +val test5 = C2 { a, b -> val x: Int = a + b; println(x)} diff --git a/compiler/testData/ir/irText/classes/enum.fir.txt b/compiler/testData/ir/irText/classes/enum.fir.txt index 4895b17bfc6..9294cdd20e2 100644 --- a/compiler/testData/ir/irText/classes/enum.fir.txt +++ b/compiler/testData/ir/irText/classes/enum.fir.txt @@ -484,7 +484,7 @@ FILE fqName: fileName:/enum.kt SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Int visibility:private [final]' type=kotlin.Unit origin=null receiver: GET_VAR ': .TestEnum4.TEST2 declared in .TestEnum4.TEST2' type=.TestEnum4.TEST2 origin=null value: CALL 'public final fun (): kotlin.Int declared in .TestEnum4' type=kotlin.Int origin=null - $this: GET_VAR ': .TestEnum4 declared in .TestEnum4' type=.TestEnum4 origin=null + $this: GET_VAR ': .TestEnum4.TEST2 declared in .TestEnum4.TEST2' type=.TestEnum4.TEST2 origin=null FUN name:foo visibility:public modality:FINAL <> ($this:.TestEnum4.TEST2) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.TestEnum4.TEST2 BLOCK_BODY diff --git a/compiler/testData/ir/irText/classes/initVar.fir.txt b/compiler/testData/ir/irText/classes/initVar.fir.txt index 35947710e1f..2e33ef48c59 100644 --- a/compiler/testData/ir/irText/classes/initVar.fir.txt +++ b/compiler/testData/ir/irText/classes/initVar.fir.txt @@ -140,7 +140,6 @@ FILE fqName: fileName:/initVar.kt VALUE_PARAMETER name:value index:0 type:kotlin.Int BLOCK_BODY SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private' type=kotlin.Unit origin=null - receiver: GET_VAR ': .TestInitVarWithCustomSetter declared in .TestInitVarWithCustomSetter' type=.TestInitVarWithCustomSetter origin=null value: GET_VAR 'value: kotlin.Int declared in .TestInitVarWithCustomSetter.' type=kotlin.Int origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: @@ -172,7 +171,6 @@ FILE fqName: fileName:/initVar.kt VALUE_PARAMETER name:value index:0 type:kotlin.Int BLOCK_BODY SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private' type=kotlin.Unit origin=null - receiver: GET_VAR ': .TestInitVarWithCustomSetterWithExplicitCtor declared in .TestInitVarWithCustomSetterWithExplicitCtor' type=.TestInitVarWithCustomSetterWithExplicitCtor origin=null value: GET_VAR 'value: kotlin.Int declared in .TestInitVarWithCustomSetterWithExplicitCtor.' type=kotlin.Int origin=null ANONYMOUS_INITIALIZER isStatic=false BLOCK_BODY @@ -213,7 +211,6 @@ FILE fqName: fileName:/initVar.kt VALUE_PARAMETER name:value index:0 type:kotlin.Int BLOCK_BODY SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private' type=kotlin.Unit origin=null - receiver: GET_VAR ': .TestInitVarWithCustomSetterInCtor declared in .TestInitVarWithCustomSetterInCtor' type=.TestInitVarWithCustomSetterInCtor origin=null value: GET_VAR 'value: kotlin.Int declared in .TestInitVarWithCustomSetterInCtor.' type=kotlin.Int origin=null CONSTRUCTOR visibility:public <> () returnType:.TestInitVarWithCustomSetterInCtor BLOCK_BODY diff --git a/compiler/testData/ir/irText/classes/outerClassAccess.fir.txt b/compiler/testData/ir/irText/classes/outerClassAccess.fir.txt index d7ad7036682..ca2713a020e 100644 --- a/compiler/testData/ir/irText/classes/outerClassAccess.fir.txt +++ b/compiler/testData/ir/irText/classes/outerClassAccess.fir.txt @@ -37,7 +37,7 @@ FILE fqName: fileName:/outerClassAccess.kt $receiver: VALUE_PARAMETER name: type:.Outer BLOCK_BODY CALL 'public final fun foo (): kotlin.Unit declared in .Outer' type=kotlin.Unit origin=null - $this: GET_VAR ': .Outer declared in .Outer' type=.Outer origin=null + $this: GET_VAR ': .Outer declared in .Outer.Inner.Inner2.test3' type=.Outer origin=null 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 [operator] declared in kotlin.Any diff --git a/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt b/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt index b1c2e0466ba..24e61e4b2ce 100644 --- a/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt +++ b/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt @@ -59,7 +59,6 @@ FILE fqName: fileName:/classLevelProperties.kt VALUE_PARAMETER name:value index:0 type:kotlin.Int BLOCK_BODY SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test4 type:kotlin.Int visibility:private' type=kotlin.Unit origin=null - receiver: GET_VAR ': .C declared in .C' type=.C origin=null value: GET_VAR 'value: kotlin.Int declared in .C.' type=kotlin.Int origin=null PROPERTY name:test5 visibility:public modality:FINAL [var] FIELD PROPERTY_BACKING_FIELD name:test5 type:kotlin.Int visibility:private diff --git a/compiler/testData/ir/irText/errors/suppressedNonPublicCall.fir.txt b/compiler/testData/ir/irText/errors/suppressedNonPublicCall.fir.txt deleted file mode 100644 index 181a4a0cf00..00000000000 --- a/compiler/testData/ir/irText/errors/suppressedNonPublicCall.fir.txt +++ /dev/null @@ -1,28 +0,0 @@ -FILE fqName: fileName:/suppressedNonPublicCall.kt - CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.C - CONSTRUCTOR visibility:public <> () returnType:.C [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN name:bar visibility:internal modality:FINAL <> ($this:.C) returnType:kotlin.Unit - $this: VALUE_PARAMETER name: type:.C - BLOCK_BODY - 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 [operator] 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 name:foo visibility:public modality:FINAL <> ($receiver:.C) returnType:kotlin.Unit [inline] - $receiver: VALUE_PARAMETER name: type:.C - BLOCK_BODY - CALL 'internal final fun bar (): kotlin.Unit declared in .C' type=kotlin.Unit origin=null - $this: GET_VAR ': .C declared in .C' type=.C origin=null diff --git a/compiler/testData/ir/irText/errors/suppressedNonPublicCall.kt b/compiler/testData/ir/irText/errors/suppressedNonPublicCall.kt index 3dd8f71a30a..e3a11219d93 100644 --- a/compiler/testData/ir/irText/errors/suppressedNonPublicCall.kt +++ b/compiler/testData/ir/irText/errors/suppressedNonPublicCall.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL class C { internal fun bar() {} } diff --git a/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.txt b/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.txt index ffe0f4df246..dcf284d6474 100644 --- a/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.txt +++ b/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.txt @@ -242,6 +242,6 @@ FILE fqName: fileName:/complexAugmentedAssignment.kt VALUE_PARAMETER name:v index:0 type:.B BLOCK_BODY CALL 'public final fun plusAssign (b: .B): kotlin.Unit [operator] declared in .Host' type=kotlin.Unit origin=null - $this: GET_VAR ': .Host declared in .Host' type=.Host origin=null + $this: GET_VAR ': .Host declared in .test3' type=.Host origin=null b: CONSTRUCTOR_CALL 'public constructor (s: kotlin.Int) [primary] declared in .B' type=.B origin=null s: CONST Int type=kotlin.Int value=1000 diff --git a/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointCompareTo.fir.txt b/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointCompareTo.fir.txt index 174343a0abc..6f42022f19b 100644 --- a/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointCompareTo.fir.txt +++ b/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointCompareTo.fir.txt @@ -151,7 +151,7 @@ FILE fqName: fileName:/floatingPointCompareTo.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test1fr (x: kotlin.Float): kotlin.Int declared in ' CALL 'public open fun compareTo (other: kotlin.Float): kotlin.Int [operator] declared in kotlin.Float' type=kotlin.Int origin=null - $this: GET_VAR ': kotlin.Float declared in kotlin.Float' type=kotlin.Float origin=null + $this: GET_VAR ': kotlin.Float declared in .test1fr' type=kotlin.Float origin=null other: GET_VAR 'x: kotlin.Float declared in .test1fr' type=kotlin.Float origin=null FUN name:test2fr visibility:public modality:FINAL <> ($receiver:kotlin.Float, x:kotlin.Any) returnType:kotlin.Boolean $receiver: VALUE_PARAMETER name: type:kotlin.Float @@ -164,7 +164,7 @@ FILE fqName: fileName:/floatingPointCompareTo.kt GET_VAR 'x: kotlin.Any declared in .test2fr' type=kotlin.Any origin=null then: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: CALL 'public open fun compareTo (other: kotlin.Float): kotlin.Int [operator] declared in kotlin.Float' type=kotlin.Int origin=null - $this: GET_VAR ': kotlin.Float declared in kotlin.Float' type=kotlin.Float origin=null + $this: GET_VAR ': kotlin.Float declared in .test2fr' type=kotlin.Float origin=null other: GET_VAR 'x: kotlin.Any declared in .test2fr' type=kotlin.Float origin=null arg1: CONST Int type=kotlin.Int value=0 BRANCH @@ -181,7 +181,7 @@ FILE fqName: fileName:/floatingPointCompareTo.kt GET_VAR 'x: kotlin.Any declared in .test3fr' type=kotlin.Any origin=null then: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: CALL 'public final fun compareTo (other: kotlin.Double): kotlin.Int [operator] declared in kotlin.Float' type=kotlin.Int origin=null - $this: GET_VAR ': kotlin.Float declared in kotlin.Float' type=kotlin.Float origin=null + $this: GET_VAR ': kotlin.Float declared in .test3fr' type=kotlin.Float origin=null other: GET_VAR 'x: kotlin.Any declared in .test3fr' type=kotlin.Double origin=null arg1: CONST Int type=kotlin.Int value=0 BRANCH diff --git a/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEquals.fir.txt b/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEquals.fir.txt index 2257287f538..c759f338987 100644 --- a/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEquals.fir.txt +++ b/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEquals.fir.txt @@ -187,7 +187,7 @@ FILE fqName: fileName:/floatingPointEquals.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test1fr (x: kotlin.Float): kotlin.Boolean declared in ' CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null - $this: GET_VAR ': kotlin.Any declared in kotlin.Any' type=kotlin.Any origin=null + $this: GET_VAR ': kotlin.Float declared in .test1fr' type=kotlin.Float origin=null other: GET_VAR 'x: kotlin.Float declared in .test1fr' type=kotlin.Float origin=null FUN name:test2fr visibility:public modality:FINAL <> ($receiver:kotlin.Float, x:kotlin.Float?) returnType:kotlin.Boolean $receiver: VALUE_PARAMETER name: type:kotlin.Float @@ -195,7 +195,7 @@ FILE fqName: fileName:/floatingPointEquals.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test2fr (x: kotlin.Float?): kotlin.Boolean declared in ' CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null - $this: GET_VAR ': kotlin.Any declared in kotlin.Any' type=kotlin.Any origin=null + $this: GET_VAR ': kotlin.Float declared in .test2fr' type=kotlin.Float origin=null other: GET_VAR 'x: kotlin.Float? declared in .test2fr' type=kotlin.Float? origin=null FUN name:test3fr visibility:public modality:FINAL <> ($receiver:kotlin.Float, x:kotlin.Any) returnType:kotlin.Boolean $receiver: VALUE_PARAMETER name: type:kotlin.Float @@ -203,7 +203,7 @@ FILE fqName: fileName:/floatingPointEquals.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test3fr (x: kotlin.Any): kotlin.Boolean declared in ' CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null - $this: GET_VAR ': kotlin.Any declared in kotlin.Any' type=kotlin.Any origin=null + $this: GET_VAR ': kotlin.Float declared in .test3fr' type=kotlin.Float origin=null other: GET_VAR 'x: kotlin.Any declared in .test3fr' type=kotlin.Any origin=null FUN name:test4fr visibility:public modality:FINAL <> ($receiver:kotlin.Float, x:kotlin.Number) returnType:kotlin.Boolean $receiver: VALUE_PARAMETER name: type:kotlin.Float @@ -211,7 +211,7 @@ FILE fqName: fileName:/floatingPointEquals.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test4fr (x: kotlin.Number): kotlin.Boolean declared in ' CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null - $this: GET_VAR ': kotlin.Any declared in kotlin.Any' type=kotlin.Any origin=null + $this: GET_VAR ': kotlin.Float declared in .test4fr' type=kotlin.Float origin=null other: GET_VAR 'x: kotlin.Number declared in .test4fr' type=kotlin.Number origin=null FUN name:test5fr visibility:public modality:FINAL <> ($receiver:kotlin.Float, x:kotlin.Any) returnType:kotlin.Boolean $receiver: VALUE_PARAMETER name: type:kotlin.Float @@ -223,7 +223,7 @@ FILE fqName: fileName:/floatingPointEquals.kt if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Float GET_VAR 'x: kotlin.Any declared in .test5fr' type=kotlin.Any origin=null then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null - $this: GET_VAR ': kotlin.Any declared in kotlin.Any' type=kotlin.Any origin=null + $this: GET_VAR ': kotlin.Float declared in .test5fr' type=kotlin.Float origin=null other: GET_VAR 'x: kotlin.Any declared in .test5fr' type=kotlin.Float origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true @@ -238,7 +238,7 @@ FILE fqName: fileName:/floatingPointEquals.kt if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Double GET_VAR 'x: kotlin.Any declared in .test6fr' type=kotlin.Any origin=null then: CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null - $this: GET_VAR ': kotlin.Any declared in kotlin.Any' type=kotlin.Any origin=null + $this: GET_VAR ': kotlin.Float declared in .test6fr' type=kotlin.Float origin=null other: GET_VAR 'x: kotlin.Any declared in .test6fr' type=kotlin.Double origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true diff --git a/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.fir.txt b/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.fir.txt index fa953857bca..f98705b442b 100644 --- a/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.fir.txt +++ b/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.fir.txt @@ -73,7 +73,7 @@ FILE fqName: fileName:/forWithImplicitReceivers.kt RETURN type=kotlin.Nothing from='public open fun hasNext (): kotlin.Boolean [operator] declared in .IReceiver' CALL 'public final fun greater (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=GT arg0: CALL 'public final fun (): kotlin.Int declared in .IntCell' type=kotlin.Int origin=null - $this: GET_VAR ': .IntCell declared in .IntCell' type=.IntCell origin=null + $this: GET_VAR ': .IntCell declared in .IReceiver.hasNext' type=.IntCell origin=null arg1: CONST Int type=kotlin.Int value=0 FUN name:next visibility:public modality:OPEN <> ($this:.IReceiver, $receiver:.IntCell) returnType:kotlin.Int [operator] $this: VALUE_PARAMETER name: type:.IReceiver @@ -83,9 +83,9 @@ FILE fqName: fileName:/forWithImplicitReceivers.kt BLOCK type=kotlin.Int origin=null VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val] CALL 'public final fun (): kotlin.Int declared in .IntCell' type=kotlin.Int origin=null - $this: GET_VAR ': .IntCell declared in .IntCell' type=.IntCell origin=null + $this: GET_VAR ': .IntCell declared in .IReceiver.next' type=.IntCell origin=null SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.Int visibility:private' type=kotlin.Unit origin=null - receiver: GET_VAR ': .IntCell declared in .IntCell' type=.IntCell origin=null + receiver: GET_VAR ': .IntCell declared in .IReceiver.next' type=.IntCell origin=null value: CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null $this: GET_VAR 'val tmp_0: kotlin.Int [val] declared in .IReceiver.next' type=kotlin.Int origin=null GET_VAR 'val tmp_0: kotlin.Int [val] declared in .IReceiver.next' type=kotlin.Int origin=null @@ -109,13 +109,13 @@ FILE fqName: fileName:/forWithImplicitReceivers.kt GET_OBJECT 'CLASS OBJECT name:FiveTimes modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.FiveTimes VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:.IntCell [val] CALL 'public open fun iterator (): .IntCell [operator] declared in .IReceiver' type=.IntCell origin=null - $this: GET_VAR ': .IReceiver declared in .IReceiver' type=.IReceiver origin=null + $this: GET_VAR ': .IReceiver declared in .test' type=.IReceiver origin=null WHILE label=null origin=FOR_LOOP_INNER_WHILE condition: CALL 'public open fun hasNext (): kotlin.Boolean [operator] declared in .IReceiver' type=kotlin.Boolean origin=null - $this: GET_VAR ': .IReceiver declared in .IReceiver' type=.IReceiver origin=null + $this: GET_VAR ': .IReceiver declared in .test' type=.IReceiver origin=null body: BLOCK type=kotlin.Unit origin=null VAR name:i type:kotlin.Int [val] CALL 'public open fun next (): kotlin.Int [operator] declared in .IReceiver' type=kotlin.Int origin=null - $this: GET_VAR ': .IReceiver declared in .IReceiver' type=.IReceiver origin=null + $this: GET_VAR ': .IReceiver declared in .test' type=.IReceiver origin=null CALL 'public final fun println (message: kotlin.Int): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null message: GET_VAR 'val i: kotlin.Int [val] declared in .test' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/expressions/implicitCastToTypeParameter.fir.txt b/compiler/testData/ir/irText/expressions/implicitCastToTypeParameter.fir.txt index 656daee2022..85c79b0d474 100644 --- a/compiler/testData/ir/irText/expressions/implicitCastToTypeParameter.fir.txt +++ b/compiler/testData/ir/irText/expressions/implicitCastToTypeParameter.fir.txt @@ -55,7 +55,7 @@ FILE fqName: fileName:/implicitCastToTypeParameter.kt TYPE_OP type=T of .Bar origin=CAST typeOperand=T of .Bar GET_VAR 'arg: kotlin.Any declared in .Bar.test' type=kotlin.Any origin=null CALL 'public final fun useT (t: T of .Bar): kotlin.Unit declared in .Bar' type=kotlin.Unit origin=null - $this: GET_VAR ': .Bar declared in .Bar' type=.Bar<*> origin=null + $this: GET_VAR ': .Bar declared in .Bar' type=.Bar.Bar> origin=null t: GET_VAR 'arg: kotlin.Any declared in .Bar.test' type=T of .Bar origin=null FUN name:useT visibility:public modality:FINAL <> ($this:.Bar, t:T of .Bar) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.Bar diff --git a/compiler/testData/ir/irText/expressions/jvmInstanceFieldReference.fir.txt b/compiler/testData/ir/irText/expressions/jvmInstanceFieldReference.fir.txt index 3abf4b6e49f..7ad1729ea01 100644 --- a/compiler/testData/ir/irText/expressions/jvmInstanceFieldReference.fir.txt +++ b/compiler/testData/ir/irText/expressions/jvmInstanceFieldReference.fir.txt @@ -8,14 +8,14 @@ FILE fqName: fileName:/Derived.kt ANONYMOUS_INITIALIZER isStatic=false BLOCK_BODY SET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:value type:kotlin.Int visibility:public' type=kotlin.Unit origin=null - receiver: GET_VAR ': .Base declared in .Base' type=.Base origin=null + receiver: GET_VAR ': .Derived declared in .Derived' type=.Derived origin=null value: CONST Int type=kotlin.Int value=0 FUN name:getValue visibility:public modality:FINAL <> ($this:.Derived) returnType:kotlin.Int $this: VALUE_PARAMETER name: type:.Derived BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun getValue (): kotlin.Int declared in .Derived' GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:value type:kotlin.Int visibility:public' type=kotlin.Int origin=GET_PROPERTY - receiver: GET_VAR ': .Base declared in .Base' type=.Base origin=null + receiver: GET_VAR ': .Derived declared in .Derived' type=.Derived origin=null FUN name:setValue visibility:public modality:FINAL <> ($this:.Derived, value:kotlin.Int) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.Derived VALUE_PARAMETER name:value index:0 type:kotlin.Int diff --git a/compiler/testData/ir/irText/expressions/kt16904.fir.txt b/compiler/testData/ir/irText/expressions/kt16904.fir.txt index 6b0270b9804..7b10b358bca 100644 --- a/compiler/testData/ir/irText/expressions/kt16904.fir.txt +++ b/compiler/testData/ir/irText/expressions/kt16904.fir.txt @@ -77,12 +77,12 @@ FILE fqName: fileName:/kt16904.kt BLOCK_BODY CALL 'public final fun plusAssign (x: kotlin.Int): kotlin.Unit [operator] declared in .B' type=kotlin.Unit origin=null $this: CALL 'public final fun (): .B declared in .A' type=.B origin=null - $this: GET_VAR ': .A declared in .A' type=.A origin=null + $this: GET_VAR ': .Test1 declared in .Test1' type=.Test1 origin=null x: CONST Int type=kotlin.Int value=42 SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:private' type=kotlin.Unit origin=null value: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null $this: CALL 'public final fun (): kotlin.Int declared in .A' type=kotlin.Int origin=null - $this: GET_VAR ': .A declared in .A' type=.A origin=null + $this: GET_VAR ': .Test1 declared in .Test1' type=.Test1 origin=null other: CONST Int type=kotlin.Int value=42 DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test1 modality:FINAL visibility:public superTypes:[.A]' @@ -126,7 +126,7 @@ FILE fqName: fileName:/kt16904.kt ANONYMOUS_INITIALIZER isStatic=false BLOCK_BODY SET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:field type:kotlin.Int visibility:public' type=kotlin.Unit origin=null - receiver: GET_VAR ': .J declared in .J' type=.J origin=null + receiver: GET_VAR ': .Test2 declared in .Test2' type=.Test2 origin=null value: CONST Int type=kotlin.Int value=42 FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: diff --git a/compiler/testData/ir/irText/expressions/multipleThisReferences.fir.txt b/compiler/testData/ir/irText/expressions/multipleThisReferences.fir.txt index 2a5a1e9b7fa..eefe7b20dce 100644 --- a/compiler/testData/ir/irText/expressions/multipleThisReferences.fir.txt +++ b/compiler/testData/ir/irText/expressions/multipleThisReferences.fir.txt @@ -85,7 +85,7 @@ FILE fqName: fileName:/multipleThisReferences.kt EXPRESSION_BODY CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null $this: CALL 'public final fun (): kotlin.Int declared in .Outer.Inner' type=kotlin.Int origin=null - $this: GET_VAR ': .Outer.Inner declared in .Outer.Inner' type=.Outer.Inner origin=null + $this: GET_VAR ': . declared in .' type=. origin=null other: GET_VAR 'y: kotlin.Int declared in .Host.' type=kotlin.Int origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.Host.test.) returnType:kotlin.Int correspondingProperty: PROPERTY name:xx visibility:public modality:FINAL [val] diff --git a/compiler/testData/ir/irText/expressions/safeCalls.fir.txt b/compiler/testData/ir/irText/expressions/safeCalls.fir.txt index 4407e8e07b8..5dac7077885 100644 --- a/compiler/testData/ir/irText/expressions/safeCalls.fir.txt +++ b/compiler/testData/ir/irText/expressions/safeCalls.fir.txt @@ -46,7 +46,7 @@ FILE fqName: fileName:/safeCalls.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun extLength (): kotlin.Int declared in .IHost' CALL 'public open fun (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null - $this: GET_VAR ': kotlin.String declared in kotlin.String' type=kotlin.String origin=null + $this: GET_VAR ': kotlin.String declared in .IHost.extLength' type=kotlin.String origin=null 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 [operator] declared in kotlin.Any @@ -92,7 +92,7 @@ FILE fqName: fileName:/safeCalls.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test5 (s: kotlin.String?): kotlin.Int? declared in ' CALL 'public open fun extLength (): kotlin.Int declared in .IHost' type=kotlin.Int? origin=null - $this: GET_VAR ': .IHost declared in .IHost' type=.IHost origin=null + $this: GET_VAR ': .IHost declared in .test5' type=.IHost origin=null FUN name:foo visibility:public modality:FINAL <> ($receiver:kotlin.Int) returnType:kotlin.Int $receiver: VALUE_PARAMETER name: type:kotlin.Int BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/sam/samConversions.fir.txt b/compiler/testData/ir/irText/expressions/sam/samConversions.fir.txt index 66ef4b42090..b7963ca81b1 100644 --- a/compiler/testData/ir/irText/expressions/sam/samConversions.fir.txt +++ b/compiler/testData/ir/irText/expressions/sam/samConversions.fir.txt @@ -6,7 +6,7 @@ FILE fqName: fileName:/samConversions.kt CALL 'public open fun runStatic (r: java.lang.Runnable?): kotlin.Unit [operator] declared in .J' type=kotlin.Unit origin=null r: GET_VAR 'a: java.lang.Runnable declared in .test0' type=java.lang.Runnable origin=null CALL 'public open fun runIt (r: java.lang.Runnable?): kotlin.Unit [operator] declared in .J' type=kotlin.Unit origin=null - $this: GET_VAR ': .J declared in .J' type=.J origin=null + $this: GET_VAR ': .J declared in .test0' type=.J origin=null r: GET_VAR 'a: java.lang.Runnable declared in .test0' type=java.lang.Runnable origin=null FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY @@ -19,7 +19,7 @@ FILE fqName: fileName:/samConversions.kt $receiver: VALUE_PARAMETER name: type:.J BLOCK_BODY CALL 'public open fun runIt (r: java.lang.Runnable?): kotlin.Unit [operator] declared in .J' type=kotlin.Unit origin=null - $this: GET_VAR ': .J declared in .J' type=.J origin=null + $this: GET_VAR ': .J declared in .test2' type=.J origin=null r: FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY @@ -29,7 +29,7 @@ FILE fqName: fileName:/samConversions.kt VALUE_PARAMETER name:a index:0 type:kotlin.Function0 BLOCK_BODY CALL 'public open fun run2 (r1: java.lang.Runnable?, r2: java.lang.Runnable?): kotlin.Unit [operator] declared in .J' type=kotlin.Unit origin=null - $this: GET_VAR ': .J declared in .J' type=.J origin=null + $this: GET_VAR ': .J declared in .test3' type=.J origin=null r1: GET_VAR 'a: kotlin.Function0 declared in .test3' type=kotlin.Function0 origin=null r2: GET_VAR 'a: kotlin.Function0 declared in .test3' type=kotlin.Function0 origin=null FUN name:test4 visibility:public modality:FINAL <> ($receiver:.J, a:kotlin.Function0, b:kotlin.Function0, flag:kotlin.Boolean) returnType:kotlin.Unit @@ -39,7 +39,7 @@ FILE fqName: fileName:/samConversions.kt VALUE_PARAMETER name:flag index:2 type:kotlin.Boolean BLOCK_BODY CALL 'public open fun runIt (r: java.lang.Runnable?): kotlin.Unit [operator] declared in .J' type=kotlin.Unit origin=null - $this: GET_VAR ': .J declared in .J' type=.J origin=null + $this: GET_VAR ': .J declared in .test4' type=.J origin=null r: WHEN type=kotlin.Function0 origin=IF BRANCH if: GET_VAR 'flag: kotlin.Boolean declared in .test4' type=kotlin.Boolean origin=null diff --git a/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.fir.txt b/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.fir.txt index 76a41720269..7f6a25553b0 100644 --- a/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.fir.txt +++ b/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.fir.txt @@ -15,7 +15,7 @@ FILE fqName: fileName:/Derived.kt GET_VAR 'v: kotlin.Any declared in .Derived.setValue' type=kotlin.Any origin=null then: BLOCK type=kotlin.Unit origin=null SET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:value type:kotlin.String? visibility:public' type=kotlin.Unit origin=null - receiver: GET_VAR ': .Base declared in .Base' type=.Base origin=null + receiver: GET_VAR ': .Derived declared in .Derived' type=.Derived origin=null value: GET_VAR 'v: kotlin.Any declared in .Derived.setValue' type=kotlin.String origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: diff --git a/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.fir.txt b/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.fir.txt index 1ef7ab328b7..60a79da3cbe 100644 --- a/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.fir.txt +++ b/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.fir.txt @@ -79,9 +79,9 @@ FILE fqName: fileName:/thisOfGenericOuterClass.kt EXPRESSION_BODY CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null $this: CALL 'public final fun (): kotlin.Int declared in .Outer' type=kotlin.Int origin=null - $this: GET_VAR ': .Outer declared in .Outer' type=.Outer<*> origin=null + $this: GET_VAR ': .Outer declared in .test' type=.Outer origin=null other: CALL 'public final fun (): kotlin.Int declared in .Outer.Inner' type=kotlin.Int origin=null - $this: GET_VAR ': .Outer.Inner declared in .Outer.Inner' type=.Outer.Inner origin=null + $this: GET_VAR ': . declared in .' type=. origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.test.) returnType:kotlin.Int correspondingProperty: PROPERTY name:xx visibility:public modality:FINAL [val] $this: VALUE_PARAMETER name: type:.test. diff --git a/compiler/testData/ir/irText/stubs/genericClassInDifferentModule_m2.fir.txt b/compiler/testData/ir/irText/stubs/genericClassInDifferentModule_m2.fir.txt index 2c44ab28b93..7d3eda72d4b 100644 --- a/compiler/testData/ir/irText/stubs/genericClassInDifferentModule_m2.fir.txt +++ b/compiler/testData/ir/irText/stubs/genericClassInDifferentModule_m2.fir.txt @@ -16,7 +16,7 @@ FILE fqName: fileName:/genericClassInDifferentModule_m2.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun foo (y: Y of .Derived1.foo): T of .Derived1 declared in .Derived1' CALL 'public final fun (): T of .Derived1 declared in .Base' type=T of .Derived1 origin=null - $this: GET_VAR ': .Base declared in .Base' type=.Base<*> origin=null + $this: GET_VAR ': .Derived1 declared in .Derived1' type=.Derived1.Derived1> origin=null PROPERTY name:bar visibility:public modality:FINAL [var] FIELD PROPERTY_BACKING_FIELD name:bar type:T of .Derived1 visibility:private EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/types/explicitEqualsAndCompareToCallsOnPlatformTypeReceiver.fir.txt b/compiler/testData/ir/irText/types/explicitEqualsAndCompareToCallsOnPlatformTypeReceiver.fir.txt index 5c19c8804e3..34750664f7d 100644 --- a/compiler/testData/ir/irText/types/explicitEqualsAndCompareToCallsOnPlatformTypeReceiver.fir.txt +++ b/compiler/testData/ir/irText/types/explicitEqualsAndCompareToCallsOnPlatformTypeReceiver.fir.txt @@ -5,16 +5,16 @@ FILE fqName: fileName:/explicitEqualsAndCompareToCallsOnPlatformTypeReceiv RETURN type=kotlin.Nothing from='public final fun testPlatformEqualsPlatform (): kotlin.Boolean declared in ' CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: CALL 'public open fun null0 (): kotlin.Double? [operator] declared in .JavaClass' type=kotlin.Double? origin=null - $this: GET_VAR ': .JavaClass declared in .JavaClass' type=.JavaClass origin=null + $this: GET_VAR ': .JavaClass declared in .testPlatformEqualsPlatform' type=.JavaClass origin=null other: CALL 'public open fun null0 (): kotlin.Double? [operator] declared in .JavaClass' type=kotlin.Double? origin=null - $this: GET_VAR ': .JavaClass declared in .JavaClass' type=.JavaClass origin=null + $this: GET_VAR ': .JavaClass declared in .testPlatformEqualsPlatform' type=.JavaClass origin=null FUN name:testPlatformEqualsKotlin visibility:public modality:FINAL <> ($receiver:.JavaClass) returnType:kotlin.Boolean $receiver: VALUE_PARAMETER name: type:.JavaClass BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testPlatformEqualsKotlin (): kotlin.Boolean declared in ' CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: CALL 'public open fun null0 (): kotlin.Double? [operator] declared in .JavaClass' type=kotlin.Double? origin=null - $this: GET_VAR ': .JavaClass declared in .JavaClass' type=.JavaClass origin=null + $this: GET_VAR ': .JavaClass declared in .testPlatformEqualsKotlin' type=.JavaClass origin=null other: CONST Double type=kotlin.Double value=0.0 FUN name:testKotlinEqualsPlatform visibility:public modality:FINAL <> ($receiver:.JavaClass) returnType:kotlin.Boolean $receiver: VALUE_PARAMETER name: type:.JavaClass @@ -23,23 +23,23 @@ FILE fqName: fileName:/explicitEqualsAndCompareToCallsOnPlatformTypeReceiv CALL 'public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any' type=kotlin.Boolean origin=null $this: CONST Double type=kotlin.Double value=0.0 other: CALL 'public open fun null0 (): kotlin.Double? [operator] declared in .JavaClass' type=kotlin.Double? origin=null - $this: GET_VAR ': .JavaClass declared in .JavaClass' type=.JavaClass origin=null + $this: GET_VAR ': .JavaClass declared in .testKotlinEqualsPlatform' type=.JavaClass origin=null FUN name:testPlatformCompareToPlatform visibility:public modality:FINAL <> ($receiver:.JavaClass) returnType:kotlin.Int $receiver: VALUE_PARAMETER name: type:.JavaClass BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testPlatformCompareToPlatform (): kotlin.Int declared in ' CALL 'public open fun compareTo (other: kotlin.Double): kotlin.Int [operator] declared in kotlin.Double' type=kotlin.Int origin=null $this: CALL 'public open fun null0 (): kotlin.Double? [operator] declared in .JavaClass' type=kotlin.Double? origin=null - $this: GET_VAR ': .JavaClass declared in .JavaClass' type=.JavaClass origin=null + $this: GET_VAR ': .JavaClass declared in .testPlatformCompareToPlatform' type=.JavaClass origin=null other: CALL 'public open fun null0 (): kotlin.Double? [operator] declared in .JavaClass' type=kotlin.Double? origin=null - $this: GET_VAR ': .JavaClass declared in .JavaClass' type=.JavaClass origin=null + $this: GET_VAR ': .JavaClass declared in .testPlatformCompareToPlatform' type=.JavaClass origin=null FUN name:testPlatformCompareToKotlin visibility:public modality:FINAL <> ($receiver:.JavaClass) returnType:kotlin.Int $receiver: VALUE_PARAMETER name: type:.JavaClass BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testPlatformCompareToKotlin (): kotlin.Int declared in ' CALL 'public open fun compareTo (other: kotlin.Double): kotlin.Int [operator] declared in kotlin.Double' type=kotlin.Int origin=null $this: CALL 'public open fun null0 (): kotlin.Double? [operator] declared in .JavaClass' type=kotlin.Double? origin=null - $this: GET_VAR ': .JavaClass declared in .JavaClass' type=.JavaClass origin=null + $this: GET_VAR ': .JavaClass declared in .testPlatformCompareToKotlin' type=.JavaClass origin=null other: CONST Double type=kotlin.Double value=0.0 FUN name:testKotlinCompareToPlatform visibility:public modality:FINAL <> ($receiver:.JavaClass) returnType:kotlin.Int $receiver: VALUE_PARAMETER name: type:.JavaClass @@ -48,4 +48,4 @@ FILE fqName: fileName:/explicitEqualsAndCompareToCallsOnPlatformTypeReceiv CALL 'public open fun compareTo (other: kotlin.Double): kotlin.Int [operator] declared in kotlin.Double' type=kotlin.Int origin=null $this: CONST Double type=kotlin.Double value=0.0 other: CALL 'public open fun null0 (): kotlin.Double? [operator] declared in .JavaClass' type=kotlin.Double? origin=null - $this: GET_VAR ': .JavaClass declared in .JavaClass' type=.JavaClass origin=null + $this: GET_VAR ': .JavaClass declared in .testKotlinCompareToPlatform' type=.JavaClass origin=null diff --git a/compiler/testData/ir/irText/types/genericPropertyReferenceType.fir.txt b/compiler/testData/ir/irText/types/genericPropertyReferenceType.fir.txt index 314ca58abdf..941e8f50798 100644 --- a/compiler/testData/ir/irText/types/genericPropertyReferenceType.fir.txt +++ b/compiler/testData/ir/irText/types/genericPropertyReferenceType.fir.txt @@ -45,7 +45,7 @@ FILE fqName: fileName:/genericPropertyReferenceType.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): T of declared in ' CALL 'public final fun (): T of declared in .C' type=T of origin=null - $this: GET_VAR ': .C declared in .C' type=.C<*> origin=null + $this: ERROR_CALL 'Unresolved reference: this@R|/y|' type=.C> FUN name: visibility:public modality:FINAL <> (v:T of ) returnType:kotlin.Unit correspondingProperty: PROPERTY name:y visibility:public modality:FINAL [var] VALUE_PARAMETER name:v index:0 type:T of diff --git a/compiler/testData/ir/irText/types/nullabilityAssertionOnExtensionReceiver.fir.txt b/compiler/testData/ir/irText/types/nullabilityAssertionOnExtensionReceiver.fir.txt index ba2ba0ba113..c6eb5d17c3b 100644 --- a/compiler/testData/ir/irText/types/nullabilityAssertionOnExtensionReceiver.fir.txt +++ b/compiler/testData/ir/irText/types/nullabilityAssertionOnExtensionReceiver.fir.txt @@ -33,4 +33,4 @@ FILE fqName: fileName:/nullabilityAssertionOnExtensionReceiver.kt $receiver: VALUE_PARAMETER name: type:.C BLOCK_BODY CALL 'public final fun memberExtension (): kotlin.Unit declared in .C' type=kotlin.Unit origin=null - $this: GET_VAR ': .C declared in .C' type=.C origin=null + $this: GET_VAR ': .C declared in .testMemberExt' type=.C origin=null diff --git a/idea/testData/fir/multiModule/basicWithAnnotatedJava/jvm/jvm.txt b/idea/testData/fir/multiModule/basicWithAnnotatedJava/jvm/jvm.txt index 6a169f145a8..8eac1f59fba 100644 --- a/idea/testData/fir/multiModule/basicWithAnnotatedJava/jvm/jvm.txt +++ b/idea/testData/fir/multiModule/basicWithAnnotatedJava/jvm/jvm.txt @@ -5,8 +5,8 @@ FILE: jvm.kt } public final fun test(): R|kotlin/Unit| { - lval x: R|kotlin/String| = this@R|/Annotated|.R|/Annotated.foo|(String(123)) - lval y: R|kotlin/String| = this@R|/Annotated|.R|/Annotated.foo|(Null(null)) + lval x: R|kotlin/String| = this@R|/User|.R|/Annotated.foo|(String(123)) + lval y: R|kotlin/String| = this@R|/User|.R|/Annotated.foo|(Null(null)) } } diff --git a/idea/testData/fir/multiModule/basicWithAnnotatedOverriddenJava/jvm/jvm.txt b/idea/testData/fir/multiModule/basicWithAnnotatedOverriddenJava/jvm/jvm.txt index c118b360aba..fd3000d39f7 100644 --- a/idea/testData/fir/multiModule/basicWithAnnotatedOverriddenJava/jvm/jvm.txt +++ b/idea/testData/fir/multiModule/basicWithAnnotatedOverriddenJava/jvm/jvm.txt @@ -5,8 +5,8 @@ FILE: jvm.kt } public final fun test(): R|kotlin/Unit| { - lval x: R|kotlin/String| = this@R|/AnnotatedDerived|.R|/AnnotatedDerived.foo|(String(123)) - lval y: R|kotlin/String| = this@R|/AnnotatedDerived|.R|/AnnotatedDerived.foo|(Null(null)) + lval x: R|kotlin/String| = this@R|/User|.R|/AnnotatedDerived.foo|(String(123)) + lval y: R|kotlin/String| = this@R|/User|.R|/AnnotatedDerived.foo|(Null(null)) } } diff --git a/idea/testData/fir/multiModule/basicWithJavaFakeOverride/jvm/simpleFakeOverride.txt b/idea/testData/fir/multiModule/basicWithJavaFakeOverride/jvm/simpleFakeOverride.txt index 9cfdab77635..3a773a28adb 100644 --- a/idea/testData/fir/multiModule/basicWithJavaFakeOverride/jvm/simpleFakeOverride.txt +++ b/idea/testData/fir/multiModule/basicWithJavaFakeOverride/jvm/simpleFakeOverride.txt @@ -11,7 +11,7 @@ FILE: simpleFakeOverride.kt } public final fun test(): R|kotlin/Unit| { - this@R|/A|.R|FakeOverride!|>|(R|/Some.Some|()) + this@R|/B|.R|FakeOverride!|>|(R|/Some.Some|()) } } diff --git a/idea/testData/fir/multiModule/basicWithPrimitiveJava/jvm/jvm.txt b/idea/testData/fir/multiModule/basicWithPrimitiveJava/jvm/jvm.txt index 9d565a82f0b..c41815a836d 100644 --- a/idea/testData/fir/multiModule/basicWithPrimitiveJava/jvm/jvm.txt +++ b/idea/testData/fir/multiModule/basicWithPrimitiveJava/jvm/jvm.txt @@ -5,9 +5,9 @@ FILE: jvm.kt } public final fun test(): R|kotlin/Unit| { - lval res1: R|kotlin/Boolean| = this@R|/Some|.R|/Some.foo|(Int(1)) - lval res2: R|kotlin/Boolean| = this@R|/Some|.R|/Some.foo|(Int(1).R|kotlin/Int.unaryMinus|()) - lval res3: R|ft!>, kotlin/Array!>?>!| = this@R|/Some|.R|/Some.bar|(R|kotlin/intArrayOf|(Int(0), Int(2), Int(2).R|kotlin/Int.unaryMinus|())) + lval res1: R|kotlin/Boolean| = this@R|/A|.R|/Some.foo|(Int(1)) + lval res2: R|kotlin/Boolean| = this@R|/A|.R|/Some.foo|(Int(1).R|kotlin/Int.unaryMinus|()) + lval res3: R|ft!>, kotlin/Array!>?>!| = this@R|/A|.R|/Some.bar|(R|kotlin/intArrayOf|(Int(0), Int(2), Int(2).R|kotlin/Int.unaryMinus|())) } } diff --git a/idea/testData/fir/multiModule/fieldAccessFromDerived/jvm/Derived.txt b/idea/testData/fir/multiModule/fieldAccessFromDerived/jvm/Derived.txt index 559624e728d..5a8d2fac861 100644 --- a/idea/testData/fir/multiModule/fieldAccessFromDerived/jvm/Derived.txt +++ b/idea/testData/fir/multiModule/fieldAccessFromDerived/jvm/Derived.txt @@ -5,11 +5,11 @@ FILE: Derived.kt } public final fun getValue(): R|kotlin/Int| { - ^getValue this@R|/Base|.R|/Base.value| + ^getValue this@R|/Derived|.R|/Base.value| } public final fun foo(): R|kotlin/Int| { - ^foo this@R|/Base|.R|/Base.value| + ^foo this@R|/Derived|.R|/Base.value| } } diff --git a/idea/testData/fir/multiModule/javaInheritsKotlinExtension/jvm/Test.txt b/idea/testData/fir/multiModule/javaInheritsKotlinExtension/jvm/Test.txt index 3d4c9e2e924..c1c5d117d6f 100644 --- a/idea/testData/fir/multiModule/javaInheritsKotlinExtension/jvm/Test.txt +++ b/idea/testData/fir/multiModule/javaInheritsKotlinExtension/jvm/Test.txt @@ -5,7 +5,7 @@ FILE: Test.kt } public final fun test(): R|kotlin/Unit| { - (this@R|/Inheritor|, this@R|/Tester|).R|/Inheritor.foo|(String(abc), Int(456)) + (this@R|/Tester|, this@R|/Tester|).R|/Inheritor.foo|(String(abc), Int(456)) } } diff --git a/idea/testData/fir/multiModule/javaInheritsKotlinProperty/jvm/Test.txt b/idea/testData/fir/multiModule/javaInheritsKotlinProperty/jvm/Test.txt index e4146a38334..fc841124e73 100644 --- a/idea/testData/fir/multiModule/javaInheritsKotlinProperty/jvm/Test.txt +++ b/idea/testData/fir/multiModule/javaInheritsKotlinProperty/jvm/Test.txt @@ -5,7 +5,7 @@ FILE: Test.kt } public final fun test(): R|kotlin/Int| { - ^test this@R|/Inheritor|.R|/Inheritor.x| + ^test this@R|/Tester|.R|/Inheritor.x| } } diff --git a/idea/testData/fir/multiModule/mppFakeOverrides/jvm/jvm.txt b/idea/testData/fir/multiModule/mppFakeOverrides/jvm/jvm.txt index 12dc2f5e299..c21945fcd63 100644 --- a/idea/testData/fir/multiModule/mppFakeOverrides/jvm/jvm.txt +++ b/idea/testData/fir/multiModule/mppFakeOverrides/jvm/jvm.txt @@ -22,9 +22,9 @@ FILE: jvm.kt } public final fun test(): R|kotlin/Unit| { - this@R|/A|.R|FakeOverride|(String()) - this@R|/C|.R|/C.bar|(String()) - this@R|/A|.R|FakeOverride|(String()) + this@R|/D|.R|FakeOverride|(String()) + this@R|/D|.R|/C.bar|(String()) + this@R|/D|.R|FakeOverride|(String()) } } diff --git a/idea/testData/fir/multiModule/mppMemberType/jvm/jvm.txt b/idea/testData/fir/multiModule/mppMemberType/jvm/jvm.txt index ded01b12b66..90fe0e43852 100644 --- a/idea/testData/fir/multiModule/mppMemberType/jvm/jvm.txt +++ b/idea/testData/fir/multiModule/mppMemberType/jvm/jvm.txt @@ -18,8 +18,8 @@ FILE: jvm.kt } public final fun useMember(): R|kotlin/Unit| { - this@R|/MyList|.R|/MyList.get|(Int(1)) - this@R|/MyList|.R|/MyList.set|(Int(2), Int(3)) + this@R|/DerivedList|.R|/MyList.get|(Int(1)) + this@R|/DerivedList|.R|/MyList.set|(Int(2), Int(3)) } } @@ -33,8 +33,8 @@ FILE: jvm.kt } public final fun use(): R|kotlin/Unit| { - this@R|/Wrapper|.R|/Wrapper.list|.R|/MyList.get|(Int(1)) - this@R|/Wrapper|.R|/Wrapper.list|.R|/MyList.set|(Int(2), Int(3)) + this@R|/DerivedWrapper|.R|/Wrapper.list|.R|/MyList.get|(Int(1)) + this@R|/DerivedWrapper|.R|/Wrapper.list|.R|/MyList.set|(Int(2), Int(3)) } } diff --git a/idea/testData/fir/multiModule/mppMembers/jvm/jvm.txt b/idea/testData/fir/multiModule/mppMembers/jvm/jvm.txt index 0d03c35919d..9f4eecf3e3f 100644 --- a/idea/testData/fir/multiModule/mppMembers/jvm/jvm.txt +++ b/idea/testData/fir/multiModule/mppMembers/jvm/jvm.txt @@ -17,8 +17,8 @@ FILE: jvm.kt } public final fun test(): R|kotlin/Unit| { - this@R|/A|.R|/A.foo|() - this@R|/A|.R|/A.bar|() + this@R|/C|.R|/A.foo|() + this@R|/C|.R|/A.bar|() } } @@ -28,8 +28,8 @@ FILE: jvm.kt } public final fun test(): R|kotlin/Unit| { - this@R|/A|.R|/A.foo|() - this@R|/A|.R|/A.bar|() + this@R|/D|.R|/A.foo|() + this@R|/D|.R|/A.bar|() } } diff --git a/idea/testData/fir/multiModule/mppSuperTypes/jvm/jvm.txt b/idea/testData/fir/multiModule/mppSuperTypes/jvm/jvm.txt index abf2ff1a0e8..fd084feb802 100644 --- a/idea/testData/fir/multiModule/mppSuperTypes/jvm/jvm.txt +++ b/idea/testData/fir/multiModule/mppSuperTypes/jvm/jvm.txt @@ -28,9 +28,9 @@ FILE: jvm.kt } public final fun test(): R|kotlin/Unit| { - this@R|/A|.R|/A.foo|() - this@R|/X|.R|/X.bar|() - this@R|/Y|.R|/Y.baz|() + this@R|/C|.R|/A.foo|() + this@R|/C|.R|/X.bar|() + this@R|/C|.R|/Y.baz|() } } @@ -40,9 +40,9 @@ FILE: jvm.kt } public final fun test(): R|kotlin/Unit| { - this@R|/A|.R|/A.foo|() - this@R|/X|.R|/X.bar|() - this@R|/Y|.R|/Y.baz|() + this@R|/D|.R|/A.foo|() + this@R|/D|.R|/X.bar|() + this@R|/D|.R|/Y.baz|() } }