From 5ebd24eac582e4feafe74929b00d537ef544ae95 Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Wed, 31 Mar 2021 14:58:59 +0300 Subject: [PATCH] [FIR] Save inline status of lambda after resolution --- .../extensionLambdaInDefaultArgument.fir.txt | 2 +- .../arguments/incorrectFunctionalType.fir.txt | 2 +- .../arguments/integerLiteralTypes.fir.txt | 10 +++--- .../testData/resolve/arguments/lambda.fir.txt | 34 +++++++++---------- .../resolve/arguments/lambdaInLambda.fir.txt | 8 ++--- .../resolve/arguments/lambdaInLambda2.fir.txt | 2 +- .../arguments/lambdaInUnresolvedCall.fir.txt | 4 +-- .../arguments/operatorsOverLiterals.fir.txt | 10 +++--- .../arguments/overloadWithDefault.fir.txt | 2 +- .../resolve/arguments/tryInLambda.fir.txt | 2 +- .../arguments/untouchedReturnInIf.fir.txt | 4 +-- .../varargOfLambdasWithReceiver.fir.txt | 2 +- .../callResolution/invokeAmbiguity.fir.txt | 2 +- .../resolve/callResolution/kt37056.fir.txt | 2 +- .../callResolution/lambdaAsReceiver.fir.txt | 4 +-- .../safeCallOnTypeAlias.fir.txt | 4 +-- ...ticPropertiesWrongImplicitReceiver.fir.txt | 4 +-- .../testData/resolve/cast.fir.txt | 8 ++--- .../resolve/cfg/defaultArguments.fir.txt | 2 +- .../resolve/cfg/flowFromInplaceLambda.fir.txt | 22 ++++++------ .../cfg/initBlockAndInPlaceLambda.fir.txt | 2 +- ...laceLambdaInControlFlowExpressions.fir.txt | 6 ++-- .../testData/resolve/cfg/jumps.fir.txt | 2 +- .../resolve/cfg/lambdaAsReturnOfLambda.dot | 2 +- .../cfg/lambdaAsReturnOfLambda.fir.txt | 4 +-- .../resolve/cfg/lambdaReturningObject.fir.txt | 2 +- .../testData/resolve/cfg/lambdas.dot | 4 +-- .../testData/resolve/cfg/lambdas.fir.txt | 8 ++--- .../resolve/cfg/localClassesWithImplicit.dot | 8 ++--- .../cfg/localClassesWithImplicit.fir.txt | 8 ++--- .../cfg/postponedLambdaInConstructor.fir.txt | 4 +-- .../resolve/cfg/postponedLambdas.fir.txt | 2 +- .../cfg/propertiesAndInitBlocks.fir.txt | 2 +- .../cfg/returnValuesFromLambda.fir.txt | 6 ++-- .../resolve/companionObjectCall.fir.txt | 2 +- .../resolve/covariantArrayAsReceiver.fir.txt | 2 +- .../delegates/delegateWithLambda.fir.txt | 2 +- .../extensionGenericGetValue.fir.txt | 4 +-- ...GetValueWithTypeVariableAsReceiver.fir.txt | 4 +-- .../resolve/delegates/kt41982.fir.txt | 2 +- .../functionAsExpression/Parameters.fir.txt | 20 +++++------ .../instanceAccessBeforeSuperCall.fir.txt | 8 ++--- .../superIsNotAnExpression.fir.txt | 2 +- ...xhaustiveWhenWithoutCoercionToUnit.fir.txt | 2 +- .../positive/nestedIfInLambda.fir.txt | 2 +- ...onExhaustiveWhenWithCoercionToUnit.fir.txt | 2 +- .../CallBasedInExpressionGenerator.fir.txt | 2 +- .../extensionPropertyInLambda.fir.txt | 2 +- .../invoke/doubleBrackets.fir.txt | 2 +- .../invoke/threeReceiversCorrect.fir.txt | 8 ++--- .../resolve/expresssions/lambda.fir.txt | 14 ++++---- .../expresssions/lambdaWithReceiver.fir.txt | 8 ++--- .../extendedCheckers/CanBeValChecker.fir.txt | 6 ++-- .../RedundantReturnUnitTypeChecker.fir.txt | 6 ++-- .../NotNullTypeChain.fir.txt | 2 +- .../extendedCheckers/unused/invoke.fir.txt | 4 +-- .../extendedCheckers/unused/lambda.fir.txt | 2 +- .../resolve/functionTypeAlias.fir.txt | 2 +- .../coercionToUnitWithEarlyReturn.fir.txt | 2 +- .../resolve/inference/kt41989.fir.txt | 2 +- .../lambdaAsReturnStatementOfLambda.fir.txt | 4 +-- .../resolve/inference/lambdaInElvis.fir.txt | 4 +-- .../resolve/inference/lambdasReturns.fir.txt | 2 +- .../resolve/inference/nestedLambdas.fir.txt | 4 +-- .../inference/typeDepthForTypeAlias.fir.txt | 2 +- .../innerTypeFromSuperClassInBody.fir.txt | 2 +- .../resolve/labelAndReceiverForInfix.fir.txt | 4 +-- .../resolve/lambdaArgInScopeFunction.fir.txt | 20 +++++------ .../lambdaInLhsOfTypeOperatorCall.fir.txt | 4 +-- .../lambdaPropertyTypeInference.fir.txt | 28 +++++++-------- .../testData/resolve/localObject.fir.txt | 4 +-- .../overrides/simpleMostSpecific.fir.txt | 18 +++++----- .../resolve/problems/compilerPhase.fir.txt | 2 +- ...mbdaWithTypeVariableAsExpectedType.fir.txt | 4 +-- .../resolve/problems/safeCallInvoke.fir.txt | 2 +- .../testData/resolve/rawTypeSam.fir.txt | 2 +- .../samConstructors/genericSam.fir.txt | 6 ++-- .../genericSamInferenceFromExpectType.fir.txt | 10 +++--- .../resolve/samConstructors/kotlinSam.fir.txt | 6 ++-- .../realConstructorFunction.fir.txt | 6 ++-- .../resolve/samConstructors/runnable.fir.txt | 2 +- .../resolve/samConstructors/simple.fir.txt | 6 ++-- .../resolve/samConversions/genericSam.fir.txt | 10 +++--- .../resolve/samConversions/kotlinSam.fir.txt | 10 +++--- .../notSamBecauseOfSupertype.fir.txt | 6 ++-- .../resolve/samConversions/runnable.fir.txt | 4 +-- .../samConversionInConstructorCall.fir.txt | 2 +- .../samConversions/samSupertype.fir.txt | 6 ++-- .../samSupertypeWithOverride.fir.txt | 6 ++-- .../samConversions/samWithEquals.fir.txt | 2 +- .../resolve/samConversions/simple.fir.txt | 6 ++-- .../controlStructures/returns.fir.txt | 2 +- .../resolve/smartcasts/kt10240.fir.txt | 4 +-- .../smartcasts/lambdas/inPlaceLambdas.fir.txt | 6 ++-- .../lambdas/lambdaInWhenBranch.fir.txt | 2 +- .../receivers/implicitReceivers.fir.txt | 6 ++-- .../smartcasts/safeCalls/safeCalls.fir.txt | 4 +-- .../smartcasts/smartcastToNothing.fir.txt | 2 +- .../resolve/typesInLocalFunctions.fir.txt | 4 +-- .../testData/resolve/whenAsReceiver.fir.txt | 2 +- .../addAllOnJavaCollection.fir.txt | 2 +- ...ferenceDependingOnInferredReceiver.fir.txt | 4 +-- .../genericInReceiver.fir.txt | 2 +- .../complexPostponedCfg.fir.txt | 6 ++-- .../resolveWithStdlib/components.fir.txt | 2 +- .../fromLibrary/callsInPlace.fir.txt | 20 +++++------ .../good/callsInPlace/atLeastOnce.fir.txt | 4 +-- .../good/callsInPlace/atMostOnce.fir.txt | 4 +-- .../good/callsInPlace/exactlyOnce.fir.txt | 4 +-- .../good/callsInPlace/inPlaceLambda.fir.txt | 2 +- .../good/callsInPlace/unknown.fir.txt | 4 +-- .../good/returnsImplies/receivers.fir.txt | 6 ++-- .../delegates/anonymousInDelegate.fir.txt | 2 +- .../delegates/delegateTypeMismatch.fir.txt | 4 +-- .../delegateWithAnonymousObject.fir.txt | 2 +- .../propertyWithFunctionalType.fir.txt | 4 +-- .../resolveWithStdlib/functionX.fir.txt | 4 +-- .../hashMapTypeAlias.fir.txt | 2 +- .../hashTableWithForEach.fir.txt | 4 +-- .../implicitReceiverOrder.fir.txt | 8 ++--- .../inapplicableRemoveAll.fir.txt | 2 +- .../inference/builderInference.fir.txt | 2 +- .../builderInferenceAndCoercionToUnit.fir.txt | 2 +- .../builderInferenceFromStdlib.fir.txt | 4 +-- .../inference/complexConstraintSystem.fir.txt | 2 +- .../inference/plusAssignWithLambdaInRhs.dot | 4 +-- .../plusAssignWithLambdaInRhs.fir.txt | 6 ++-- .../j+k/FunctionTypeInJava.fir.txt | 10 +++--- .../resolveWithStdlib/j+k/MapCompute.fir.txt | 2 +- .../resolveWithStdlib/j+k/MyMap.fir.txt | 12 +++---- .../j+k/SyntheticAfterFiltering.fir.txt | 2 +- .../j+k/SyntheticWithForEach.fir.txt | 4 +-- .../resolveWithStdlib/j+k/mapMerge.fir.txt | 2 +- .../javaLangComparator.fir.txt | 2 +- .../kotlinComparatorAlias.fir.txt | 2 +- .../resolveWithStdlib/mapList.fir.txt | 4 +-- .../multipleImplicitReceivers.fir.txt | 6 ++-- .../resolveWithStdlib/noneWithForEach.fir.txt | 8 ++--- .../plusAssignNullable.fir.txt | 2 +- .../problems/DeepCopyIrTree.fir.txt | 6 ++-- .../problems/SpecialCallsWithLambdas.fir.txt | 8 ++--- .../problems/invokePriority.fir.txt | 10 +++--- .../problems/invokePriorityComplex.fir.txt | 2 +- .../problems/qualifierPriority.fir.txt | 2 +- .../receiverResolutionInLambda.fir.txt | 4 +-- .../selfReferenceToCompanionObject.fir.txt | 10 +++--- .../problems/valueOfOrNull.fir.txt | 6 ++-- .../resolveWithStdlib/recursiveBug.fir.txt | 4 +-- .../constructorVarWrite.fir.txt | 2 +- .../resolveWithStdlib/removeIf.fir.txt | 2 +- .../runOnIntegerLiteral.fir.txt | 2 +- .../samForComparator.fir.txt | 2 +- .../resolveWithStdlib/simpleLazy.fir.txt | 6 ++-- .../smartcasts/tryWithLambdaInside.dot | 4 +-- .../smartcasts/tryWithLambdaInside.fir.txt | 4 +-- .../resolveWithStdlib/topLevelResolve.fir.txt | 16 ++++----- .../typeAliasWithForEach.fir.txt | 2 +- .../whenAsLambdaReturnStatement.fir.txt | 4 +-- .../withInInitializer.fir.txt | 4 +-- ...BothOldAndNewSyntaxContractDescription.txt | 2 +- .../oldSyntax/contractDescription.txt | 14 ++++---- .../rawBuilder/declarations/delegates.txt | 2 +- .../rawBuilder/expressions/labelForInfix.txt | 4 +-- .../rawBuilder/expressions/lambda.txt | 16 ++++----- .../lambdaAndAnonymousFunction.txt | 6 ++-- .../rawBuilder/expressions/locals.txt | 2 +- .../testData/rawBuilder/expressions/these.txt | 2 +- ...rCallCompletionResultsWriterTransformer.kt | 26 +++++++++++++- .../jetbrains/kotlin/fir/types/ArrayUtils.kt | 3 ++ .../fir/declarations/FirAnonymousFunction.kt | 3 ++ .../builder/FirAnonymousFunctionBuilder.kt | 3 ++ .../impl/FirAnonymousFunctionImpl.kt | 6 ++++ .../org/jetbrains/kotlin/fir/FirRenderer.kt | 4 ++- .../kotlin/fir/declarations/InlineStatus.kt | 13 +++++++ .../kotlin/fir/expressions/FirArgumentUtil.kt | 2 +- .../fir/tree/generator/BuilderConfigurator.kt | 1 + .../fir/tree/generator/NodeConfigurator.kt | 3 ++ .../kotlin/fir/tree/generator/Types.kt | 3 +- .../codegen/box/smartCasts/kt44814.dot | 4 +-- .../innerDeclarationsResolve/class.fir.txt | 2 +- .../lambdaInImplicitFunBody.fir.txt | 4 +-- .../lambdaInImplicitPropertyBody.fir.txt | 4 +-- .../lambdasInWithBodyFunction.fir.txt | 6 ++-- 183 files changed, 496 insertions(+), 437 deletions(-) create mode 100644 compiler/fir/tree/src/org/jetbrains/kotlin/fir/declarations/InlineStatus.kt diff --git a/compiler/fir/analysis-tests/testData/resolve/arguments/extensionLambdaInDefaultArgument.fir.txt b/compiler/fir/analysis-tests/testData/resolve/arguments/extensionLambdaInDefaultArgument.fir.txt index 3dea6735b4a..104b01bf4a2 100644 --- a/compiler/fir/analysis-tests/testData/resolve/arguments/extensionLambdaInDefaultArgument.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/arguments/extensionLambdaInDefaultArgument.fir.txt @@ -1,5 +1,5 @@ FILE: extensionLambdaInDefaultArgument.kt - public final fun test(f: R|kotlin/String.() -> kotlin/Int| = fun R|kotlin/String|.(): R|kotlin/Int| { + public final fun test(f: R|kotlin/String.() -> kotlin/Int| = fun R|kotlin/String|.(): R|kotlin/Int| { ^ this@R|special/anonymous|.R|kotlin/String.length| } ): R|kotlin/Int| { diff --git a/compiler/fir/analysis-tests/testData/resolve/arguments/incorrectFunctionalType.fir.txt b/compiler/fir/analysis-tests/testData/resolve/arguments/incorrectFunctionalType.fir.txt index c0375a9744e..1bf99db35be 100644 --- a/compiler/fir/analysis-tests/testData/resolve/arguments/incorrectFunctionalType.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/arguments/incorrectFunctionalType.fir.txt @@ -2,7 +2,7 @@ FILE: incorrectFunctionalType.kt public final fun foo(func: R|kotlin/Int.(kotlin/Int) -> kotlin/Int|): R|kotlin/Unit| { } public final fun test(): R|kotlin/Unit| { - R|/foo|( = foo@fun R|kotlin/Int|.(it: R|kotlin/Int|): R|kotlin/Int| { + R|/foo|( = foo@fun R|kotlin/Int|.(it: R|kotlin/Int|): R|kotlin/Int| { ^ this@R|special/anonymous|.R|kotlin/Int.plus|(R|/it|) } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/arguments/integerLiteralTypes.fir.txt b/compiler/fir/analysis-tests/testData/resolve/arguments/integerLiteralTypes.fir.txt index 7464269e561..d5a3012d9ad 100644 --- a/compiler/fir/analysis-tests/testData/resolve/arguments/integerLiteralTypes.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/arguments/integerLiteralTypes.fir.txt @@ -25,29 +25,29 @@ FILE: integerLiteralTypes.kt #(Int(1000)) } public final fun test_3(): R|kotlin/Unit| { - R|/takeInt|(R|kotlin/run|( = run@fun (): R|kotlin/Int| { + R|/takeInt|(R|kotlin/run|( = run@fun (): R|kotlin/Int| { ^ Int(1) } )) - R|/takeByte|(R|kotlin/run|( = run@fun (): R|kotlin/Byte| { + R|/takeByte|(R|kotlin/run|( = run@fun (): R|kotlin/Byte| { ^ Byte(1) } )) - R|/takeLong|(R|kotlin/run|( = run@fun (): R|kotlin/Long| { + R|/takeLong|(R|kotlin/run|( = run@fun (): R|kotlin/Long| { ^ Long(1) } )) } public final fun test_4(): R|kotlin/Unit| { R|/takeAny|(Int(1)) - R|/takeAny|(R|kotlin/run|( = run@fun (): R|kotlin/Int| { + R|/takeAny|(R|kotlin/run|( = run@fun (): R|kotlin/Int| { ^ Int(1) } )) } public final fun test_5(): R|kotlin/Unit| { #(Int(1)) - #(R|kotlin/run|( = run@fun (): R|kotlin/Int| { + #(R|kotlin/run|( = run@fun (): R|kotlin/Int| { ^ Int(1) } )) diff --git a/compiler/fir/analysis-tests/testData/resolve/arguments/lambda.fir.txt b/compiler/fir/analysis-tests/testData/resolve/arguments/lambda.fir.txt index 41004b76565..136f4895655 100644 --- a/compiler/fir/analysis-tests/testData/resolve/arguments/lambda.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/arguments/lambda.fir.txt @@ -6,70 +6,70 @@ FILE: lambda.kt public final fun baz(f: R|() -> kotlin/Unit|, other: R|kotlin/Boolean| = Boolean(true)): R|kotlin/Unit| { } public final fun test(): R|kotlin/Unit| { - R|/foo|( = foo@fun (): R|kotlin/Unit| { + R|/foo|( = foo@fun (): R|kotlin/Unit| { ^@foo Unit } ) - R|/foo|( = foo@fun (): R|kotlin/Unit| { + R|/foo|( = foo@fun (): R|kotlin/Unit| { ^@foo Unit } ) - R|/foo|(foo@fun (): R|kotlin/Unit| { + R|/foo|(foo@fun (): R|kotlin/Unit| { ^@foo Unit } ) - #(Int(1), = foo@fun (): R|kotlin/Unit| { + #(Int(1), = foo@fun (): R|kotlin/Unit| { ^@foo Unit } ) - #(f = foo@fun (): R|kotlin/Unit| { + #(f = foo@fun (): R|kotlin/Unit| { ^@foo Unit } - , = foo@fun (): R|kotlin/Unit| { + , = foo@fun (): R|kotlin/Unit| { ^@foo Unit } ) - R|/bar|(Int(1), = bar@fun (): R|kotlin/Unit| { + R|/bar|(Int(1), = bar@fun (): R|kotlin/Unit| { ^@bar Unit } ) - R|/bar|(x = Int(1), = bar@fun (): R|kotlin/Unit| { + R|/bar|(x = Int(1), = bar@fun (): R|kotlin/Unit| { ^@bar Unit } ) - R|/bar|(Int(1), bar@fun (): R|kotlin/Unit| { + R|/bar|(Int(1), bar@fun (): R|kotlin/Unit| { ^@bar Unit } ) - R|/bar|(x = Int(1), f = bar@fun (): R|kotlin/Unit| { + R|/bar|(x = Int(1), f = bar@fun (): R|kotlin/Unit| { ^@bar Unit } ) - #( = bar@fun (): R|kotlin/Unit| { + #( = bar@fun (): R|kotlin/Unit| { ^@bar Unit } ) - #(bar@fun (): R|kotlin/Unit| { + #(bar@fun (): R|kotlin/Unit| { ^@bar Unit } ) - R|/baz|(other = Boolean(false), f = baz@fun (): R|kotlin/Unit| { + R|/baz|(other = Boolean(false), f = baz@fun (): R|kotlin/Unit| { ^@baz Unit } ) - R|/baz|(baz@fun (): R|kotlin/Unit| { + R|/baz|(baz@fun (): R|kotlin/Unit| { ^@baz Unit } , Boolean(false)) - #( = baz@fun (): R|kotlin/Unit| { + #( = baz@fun (): R|kotlin/Unit| { ^@baz Unit } ) - #( = baz@fun (): R|kotlin/Unit| { + #( = baz@fun (): R|kotlin/Unit| { ^@baz Unit } ) - #(other = Boolean(false), = baz@fun (): R|kotlin/Unit| { + #(other = Boolean(false), = baz@fun (): R|kotlin/Unit| { ^@baz Unit } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/arguments/lambdaInLambda.fir.txt b/compiler/fir/analysis-tests/testData/resolve/arguments/lambdaInLambda.fir.txt index d0e14f7ad25..71b281e2478 100644 --- a/compiler/fir/analysis-tests/testData/resolve/arguments/lambdaInLambda.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/arguments/lambdaInLambda.fir.txt @@ -24,10 +24,10 @@ FILE: lambdaInLambda.kt public final fun |> R|U|.insert(template: R|T|, build: R|T.() -> kotlin/Unit|): R|kotlin/Unit| { } 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|special/anonymous|.R|/KDocTemplate.definition|( = definition@fun R|StringBuilder|.(): R|kotlin/Unit| { - R|/ordinal|?.{ $subj$.R|kotlin/let|( = let@fun (it: 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|special/anonymous|.R|/KDocTemplate.definition|( = definition@fun R|StringBuilder|.(): R|kotlin/Unit| { + R|/ordinal|?.{ $subj$.R|kotlin/let|( = let@fun (it: R|kotlin/Int|): R|kotlin/Unit| { ^@let Unit } ) } diff --git a/compiler/fir/analysis-tests/testData/resolve/arguments/lambdaInLambda2.fir.txt b/compiler/fir/analysis-tests/testData/resolve/arguments/lambdaInLambda2.fir.txt index e46f9fad432..21a88f6c732 100644 --- a/compiler/fir/analysis-tests/testData/resolve/arguments/lambdaInLambda2.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/arguments/lambdaInLambda2.fir.txt @@ -7,7 +7,7 @@ FILE: main.kt public abstract interface PsiClass : R|kotlin/Any| { } public final fun test(): R|kotlin/Unit| { - lval processor: R|AdapterProcessor, ft>| = R|/AdapterProcessor.AdapterProcessor||, R|ft|>(R|/Function||, R|PsiClass?|>( = Function@fun (method: R|PsiMethod?|): R|PsiClass?| { + lval processor: R|AdapterProcessor, ft>| = R|/AdapterProcessor.AdapterProcessor||, R|ft|>(R|/Function||, R|PsiClass?|>( = Function@fun (method: R|PsiMethod?|): R|PsiClass?| { ^ R|/method|?.{ $subj$.R|/PsiMethod.containingClass| } } )) diff --git a/compiler/fir/analysis-tests/testData/resolve/arguments/lambdaInUnresolvedCall.fir.txt b/compiler/fir/analysis-tests/testData/resolve/arguments/lambdaInUnresolvedCall.fir.txt index 1e32a1a1a30..3eb557c7464 100644 --- a/compiler/fir/analysis-tests/testData/resolve/arguments/lambdaInUnresolvedCall.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/arguments/lambdaInUnresolvedCall.fir.txt @@ -3,14 +3,14 @@ FILE: lambdaInUnresolvedCall.kt ^materialize Null(null)!! } public final fun test_1(): R|kotlin/Unit| { - #( = myRun@fun (): R|kotlin/Int| { + #( = myRun@fun (): R|kotlin/Int| { lval x: R|kotlin/Int| = Int(1) ^ R|/x|.R|kotlin/Int.times|(Int(2)) } ) } public final fun test_2(): R|kotlin/Unit| { - #( = myRun@fun (): R|kotlin/Any?| { + #( = myRun@fun (): R|kotlin/Any?| { ^ R|/materialize|() } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/arguments/operatorsOverLiterals.fir.txt b/compiler/fir/analysis-tests/testData/resolve/arguments/operatorsOverLiterals.fir.txt index 3636c3d0df2..487aa64e4d2 100644 --- a/compiler/fir/analysis-tests/testData/resolve/arguments/operatorsOverLiterals.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/arguments/operatorsOverLiterals.fir.txt @@ -52,24 +52,24 @@ FILE: operatorsOverLiterals.kt #(Int(1).R|kotlin/Int.inv|()) } public final fun test_6(): R|kotlin/Unit| { - #(R|kotlin/run|( = run@fun (): R|kotlin/Int| { + #(R|kotlin/run|( = run@fun (): R|kotlin/Int| { ^ Int(127).R|kotlin/Int.plus|(Int(1)) } )) - #(Int(1).R|kotlin/Int.plus|(R|kotlin/run|( = run@fun (): R|kotlin/Int| { + #(Int(1).R|kotlin/Int.plus|(R|kotlin/run|( = run@fun (): R|kotlin/Int| { ^ Int(1) } ))) - #(R|kotlin/run|( = run@fun (): R|kotlin/Int| { + #(R|kotlin/run|( = run@fun (): R|kotlin/Int| { ^ Int(1).R|kotlin/Int.plus|(Int(1)) } )) Int(1).R|kotlin/Int.plus|(Int(1)) - R|kotlin/run|( = run@fun (): R|kotlin/Int| { + R|kotlin/run|( = run@fun (): R|kotlin/Int| { ^ Int(1) } ) - Int(1).R|kotlin/Int.plus|(R|kotlin/run|( = run@fun (): R|kotlin/Int| { + Int(1).R|kotlin/Int.plus|(R|kotlin/run|( = run@fun (): R|kotlin/Int| { ^ Int(1) } )) diff --git a/compiler/fir/analysis-tests/testData/resolve/arguments/overloadWithDefault.fir.txt b/compiler/fir/analysis-tests/testData/resolve/arguments/overloadWithDefault.fir.txt index a78ab354c67..b2018bea314 100644 --- a/compiler/fir/analysis-tests/testData/resolve/arguments/overloadWithDefault.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/arguments/overloadWithDefault.fir.txt @@ -6,7 +6,7 @@ FILE: overloadWithDefault.kt } public final fun test(a: R|A|): R|kotlin/Unit| { - R|/a|.R|/A.foo|( = foo@fun (): R|kotlin/Boolean| { + R|/a|.R|/A.foo|( = foo@fun (): R|kotlin/Boolean| { ^ Boolean(true) } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/arguments/tryInLambda.fir.txt b/compiler/fir/analysis-tests/testData/resolve/arguments/tryInLambda.fir.txt index cc8dc269bc0..208d820792c 100644 --- a/compiler/fir/analysis-tests/testData/resolve/arguments/tryInLambda.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/arguments/tryInLambda.fir.txt @@ -5,7 +5,7 @@ FILE: tryInLambda.kt public final fun foo(): R|kotlin/Unit| { } public final fun test(): R|kotlin/Unit| { - R|/myRun|( = myRun@fun (): R|kotlin/Unit| { + R|/myRun|( = myRun@fun (): R|kotlin/Unit| { try { lval x: R|kotlin/Int| = Int(1) } diff --git a/compiler/fir/analysis-tests/testData/resolve/arguments/untouchedReturnInIf.fir.txt b/compiler/fir/analysis-tests/testData/resolve/arguments/untouchedReturnInIf.fir.txt index 57ae4330819..2e1a25405e6 100644 --- a/compiler/fir/analysis-tests/testData/resolve/arguments/untouchedReturnInIf.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/arguments/untouchedReturnInIf.fir.txt @@ -7,13 +7,13 @@ FILE: untouchedReturnInIf.kt public final fun leaves(value: R|kotlin/String|, forward: R|kotlin/Boolean|): R|Box| { when () { R|/forward| -> { - ^leaves R|/foo|( = foo@fun (it: R|kotlin/String|): R|kotlin/String| { + ^leaves R|/foo|( = foo@fun (it: R|kotlin/String|): R|kotlin/String| { ^ String() } ) } else -> { - ^leaves R|/foo|( = foo@fun (it: R|kotlin/String|): R|kotlin/String| { + ^leaves R|/foo|( = foo@fun (it: R|kotlin/String|): R|kotlin/String| { ^ String() } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/arguments/varargOfLambdasWithReceiver.fir.txt b/compiler/fir/analysis-tests/testData/resolve/arguments/varargOfLambdasWithReceiver.fir.txt index 077fc8d95f4..ceedfa89619 100644 --- a/compiler/fir/analysis-tests/testData/resolve/arguments/varargOfLambdasWithReceiver.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/arguments/varargOfLambdasWithReceiver.fir.txt @@ -2,7 +2,7 @@ FILE: varargOfLambdasWithReceiver.kt public final fun runLambdas(vararg values: @R|kotlin/ExtensionFunctionType|() R|kotlin/Array>|): R|kotlin/Unit| { } public final fun test(): R|kotlin/Unit| { - R|/runLambdas|(vararg(runLambdas@fun R|kotlin/String|.(): R|kotlin/Unit| { + R|/runLambdas|(vararg(runLambdas@fun R|kotlin/String|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|kotlin/String.length| } )) diff --git a/compiler/fir/analysis-tests/testData/resolve/callResolution/invokeAmbiguity.fir.txt b/compiler/fir/analysis-tests/testData/resolve/callResolution/invokeAmbiguity.fir.txt index 86fa6172cae..fe94554d6cd 100644 --- a/compiler/fir/analysis-tests/testData/resolve/callResolution/invokeAmbiguity.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/callResolution/invokeAmbiguity.fir.txt @@ -40,7 +40,7 @@ FILE: invokeAmbiguity.kt ^ R|kotlin/TODO|() } public final fun box(d: R|D|): R|kotlin/Unit| { - R|/d|.R|/attr|.R|/B.invoke|( = attr@fun (): R|kotlin/Unit| { + R|/d|.R|/attr|.R|/B.invoke|( = attr@fun (): R|kotlin/Unit| { ^@attr Unit } ).R|kotlin/CharSequence.length| diff --git a/compiler/fir/analysis-tests/testData/resolve/callResolution/kt37056.fir.txt b/compiler/fir/analysis-tests/testData/resolve/callResolution/kt37056.fir.txt index f28f9da1a94..aa9709e56f0 100644 --- a/compiler/fir/analysis-tests/testData/resolve/callResolution/kt37056.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/callResolution/kt37056.fir.txt @@ -1,6 +1,6 @@ FILE: kt37056.kt public final fun case1(a: R|A?|): R|kotlin/Unit| { - lval test: R|kotlin/String?| = R|/a|?.{ $subj$.R|kotlin/let|( = let@fun (it: R|A|): R|kotlin/String| { + lval test: R|kotlin/String?| = R|/a|?.{ $subj$.R|kotlin/let|( = let@fun (it: R|A|): R|kotlin/String| { Q|Case1|.R|/Case1.Companion.invoke|(R|/it|) Q|Case1|.R|/Case1.Companion.invoke|(R|/it|) ^ Q|Case1|.R|/Case1.Companion.invoke|(R|/A.A|()) diff --git a/compiler/fir/analysis-tests/testData/resolve/callResolution/lambdaAsReceiver.fir.txt b/compiler/fir/analysis-tests/testData/resolve/callResolution/lambdaAsReceiver.fir.txt index 021cd8e6ff4..eafc3a71ccf 100644 --- a/compiler/fir/analysis-tests/testData/resolve/callResolution/lambdaAsReceiver.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/callResolution/lambdaAsReceiver.fir.txt @@ -6,14 +6,14 @@ FILE: lambdaAsReceiver.kt public final fun R|kotlin/String|.bar(): R|kotlin/Unit| { } public final fun main1(): R|kotlin/Unit| { - fun (): R|kotlin/String| { + fun (): R|kotlin/String| { ^ String() } .R|/foo|() String().R|/foo|() } public final fun main2(): R|kotlin/Unit| { - fun (): R|kotlin/String| { + fun (): R|kotlin/String| { ^ String() } .#() diff --git a/compiler/fir/analysis-tests/testData/resolve/callResolution/safeCallOnTypeAlias.fir.txt b/compiler/fir/analysis-tests/testData/resolve/callResolution/safeCallOnTypeAlias.fir.txt index 0e2211cd68c..af731e93fcb 100644 --- a/compiler/fir/analysis-tests/testData/resolve/callResolution/safeCallOnTypeAlias.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/callResolution/safeCallOnTypeAlias.fir.txt @@ -1,8 +1,8 @@ FILE: safeCallOnTypeAlias.kt public final typealias MyTypeAlias = R|() -> kotlin/String?| public final fun foo(x: R|MyTypeAlias|): R|kotlin/Unit| { - R|/x|?.{ $subj$.R|kotlin/let| kotlin/String?|, R|kotlin/String?|>( = let@fun (y: R|() -> kotlin/String?|): R|kotlin/String?| { - ^ R|/y|.R|SubstitutionOverride|()?.{ $subj$.R|kotlin/let|( = let@fun (result: R|kotlin/String|): R|kotlin/String| { + R|/x|?.{ $subj$.R|kotlin/let| kotlin/String?|, R|kotlin/String?|>( = let@fun (y: R|() -> kotlin/String?|): R|kotlin/String?| { + ^ R|/y|.R|SubstitutionOverride|()?.{ $subj$.R|kotlin/let|( = let@fun (result: R|kotlin/String|): R|kotlin/String| { ^ R|/bar|(R|/result|) } ) } diff --git a/compiler/fir/analysis-tests/testData/resolve/callResolution/syntheticPropertiesWrongImplicitReceiver.fir.txt b/compiler/fir/analysis-tests/testData/resolve/callResolution/syntheticPropertiesWrongImplicitReceiver.fir.txt index 29851d47d67..d665120510a 100644 --- a/compiler/fir/analysis-tests/testData/resolve/callResolution/syntheticPropertiesWrongImplicitReceiver.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/callResolution/syntheticPropertiesWrongImplicitReceiver.fir.txt @@ -6,13 +6,13 @@ FILE: main.kt ^ Int(1) } public final fun bar(a: R|A|): R|kotlin/Unit| { - R|/a|.R|/foo|.R|/checkType|(checkType@fun R|CheckTypeInv|.(): R|kotlin/Unit| { + R|/a|.R|/foo|.R|/checkType|(checkType@fun R|CheckTypeInv|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|/_|() } ) } public final fun R|JavaClass|.bar(a: R|A|): R|kotlin/Unit| { - R|/a|.R|/foo|.R|/checkType|(checkType@fun R|CheckTypeInv|.(): R|kotlin/Unit| { + R|/a|.R|/foo|.R|/checkType|(checkType@fun R|CheckTypeInv|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|/_|() } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/cast.fir.txt b/compiler/fir/analysis-tests/testData/resolve/cast.fir.txt index ca2d385e8ef..44396b82148 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cast.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/cast.fir.txt @@ -3,22 +3,22 @@ FILE: cast.kt public get(): R|kotlin/Int| public final val y: R|kotlin/Any| = (Int(2) as R|kotlin/Any|) public get(): R|kotlin/Any| - public final val f: R|() -> kotlin/Any| = fun (): R|kotlin/Any| { + public final val f: R|() -> kotlin/Any| = fun (): R|kotlin/Any| { ^ (Int(3) as R|kotlin/Any|) } public get(): R|() -> kotlin/Any| - public final val g: R|() -> kotlin/Unit| = fun (): R|kotlin/Unit| { + public final val g: R|() -> kotlin/Unit| = fun (): R|kotlin/Unit| { ^ Unit } public get(): R|() -> kotlin/Unit| - public final val h: R|(kotlin/String) -> kotlin/Boolean| = fun (_: R|kotlin/String|): R|kotlin/Boolean| { + public final val h: R|(kotlin/String) -> kotlin/Boolean| = fun (_: R|kotlin/String|): R|kotlin/Boolean| { ^ Boolean(false) } public get(): R|(kotlin/String) -> kotlin/Boolean| - public final val hError: R|(ERROR CLASS: No type for parameter) -> kotlin/Boolean| = fun (_: R|ERROR CLASS: No type for parameter|): R|kotlin/Boolean| { + public final val hError: R|(ERROR CLASS: No type for parameter) -> kotlin/Boolean| = fun (_: R|ERROR CLASS: No type for parameter|): R|kotlin/Boolean| { ^ Boolean(true) } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/defaultArguments.fir.txt b/compiler/fir/analysis-tests/testData/resolve/cfg/defaultArguments.fir.txt index e04d4ef537b..2e9ac61bc10 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/defaultArguments.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/defaultArguments.fir.txt @@ -2,7 +2,7 @@ FILE: defaultArguments.kt public final fun foo(): R|kotlin/Int| { ^foo Int(1) } - public final fun test(x: R|kotlin/Any|, y: R|kotlin/String| = (R|/x| as R|kotlin/String|), z: R|kotlin/Int| = R|kotlin/run|( = run@fun (): R|kotlin/Int| { + public final fun test(x: R|kotlin/Any|, y: R|kotlin/String| = (R|/x| as R|kotlin/String|), z: R|kotlin/Int| = R|kotlin/run|( = run@fun (): R|kotlin/Int| { ^ R|/foo|() } )): R|kotlin/Unit| { diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda.fir.txt b/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda.fir.txt index 153057e60ca..2f771773521 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda.fir.txt @@ -14,18 +14,18 @@ FILE: flowFromInplaceLambda.kt ^myRun R|/block|.R|SubstitutionOverride|() } public final fun test_1(x: R|kotlin/Any|): R|kotlin/Unit| { - R|kotlin/run|( = run@fun (): R|kotlin/Int| { + R|kotlin/run|( = run@fun (): R|kotlin/Int| { ^ (R|/x| as R|kotlin/Int|) } ) R|/takeInt|(R|/x|) } public final fun test_2(x: R|kotlin/Any|, y: R|kotlin/Any|): R|kotlin/Unit| { - lval a: R|kotlin/Int| = R|/select|(vararg(R|/id|(R|kotlin/run|( = run@fun (): R|kotlin/Int| { + lval a: R|kotlin/Int| = R|/select|(vararg(R|/id|(R|kotlin/run|( = run@fun (): R|kotlin/Int| { R|/y|.#() ^ (R|/x| as R|kotlin/Int|) } - )), (R|/y| as R|kotlin/Int|), R|kotlin/run|( = run@fun (): R|kotlin/Int| { + )), (R|/y| as R|kotlin/Int|), R|kotlin/run|( = run@fun (): R|kotlin/Int| { R|/x|.R|kotlin/Int.inc|() R|/y|.R|kotlin/Int.inc|() ^ Int(1) @@ -36,12 +36,12 @@ FILE: flowFromInplaceLambda.kt R|/takeInt|(R|/a|) } public final fun test_3(x: R|kotlin/Any|, y: R|kotlin/Any|): R|kotlin/Unit| { - lval a: R|kotlin/Int| = R|/select|(vararg(R|/id|(R|kotlin/run|( = run@fun (): R|kotlin/Int| { + lval a: R|kotlin/Int| = R|/select|(vararg(R|/id|(R|kotlin/run|( = run@fun (): R|kotlin/Int| { R|/y|.#() (R|/x| as R|kotlin/Int|) ^ R|/materialize|() } - )), R|kotlin/run|( = run@fun (): R|kotlin/Int| { + )), R|kotlin/run|( = run@fun (): R|kotlin/Int| { (R|/y| as R|kotlin/Int|) R|/x|.#() R|/y|.R|kotlin/Int.inc|() @@ -53,11 +53,11 @@ FILE: flowFromInplaceLambda.kt R|/takeInt|(R|/a|) } public final fun test_4(x: R|kotlin/Any|, y: R|kotlin/Any|): R|kotlin/Unit| { - lval a: R|kotlin/Int| = R|/select|(vararg(R|/id|(R|/myRun|( = myRun@fun (): R|kotlin/Int| { + lval a: R|kotlin/Int| = R|/select|(vararg(R|/id|(R|/myRun|( = myRun@fun (): R|kotlin/Int| { R|/y|.#() ^ (R|/x| as R|kotlin/Int|) } - )), (R|/y| as R|kotlin/Int|), R|/myRun|( = myRun@fun (): R|kotlin/Int| { + )), (R|/y| as R|kotlin/Int|), R|/myRun|( = myRun@fun (): R|kotlin/Int| { R|/x|.#() R|/y|.R|kotlin/Int.inc|() ^ Int(1) @@ -68,18 +68,18 @@ FILE: flowFromInplaceLambda.kt R|/takeInt|(R|/a|) } public final fun test_5(): R|kotlin/Unit| { - lval x: R|kotlin/Int| = R|/select|(vararg(R|kotlin/run|( = run@fun (): R|kotlin/Int| { + lval x: R|kotlin/Int| = R|/select|(vararg(R|kotlin/run|( = run@fun (): R|kotlin/Int| { ^ R|/materialize|() } - ), R|kotlin/run|( = run@fun (): R|kotlin/Int| { + ), R|kotlin/run|( = run@fun (): R|kotlin/Int| { ^ R|/materialize|() } ))) R|/takeInt|(R|/x|) } public final fun test_6(): R|kotlin/Unit| { - lval x: R|kotlin/String| = R|/id|(R|/myRun|( = myRun@fun (): R|kotlin/String| { - ^ R|kotlin/run|( = run@fun (): R|kotlin/String| { + lval x: R|kotlin/String| = R|/id|(R|/myRun|( = myRun@fun (): R|kotlin/String| { + ^ R|kotlin/run|( = run@fun (): R|kotlin/String| { ^ R|/materialize|() } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/initBlockAndInPlaceLambda.fir.txt b/compiler/fir/analysis-tests/testData/resolve/cfg/initBlockAndInPlaceLambda.fir.txt index 74398115deb..918cc9b6c4a 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/initBlockAndInPlaceLambda.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/initBlockAndInPlaceLambda.fir.txt @@ -12,7 +12,7 @@ FILE: initBlockAndInPlaceLambda.kt } init { - lval c: R|C?| = R|/a|.R|/A.b|?.{ $subj$.R|kotlin/let|( = let@fun (it: R|B|): R|C| { + lval c: R|C?| = R|/a|.R|/A.b|?.{ $subj$.R|kotlin/let|( = let@fun (it: R|B|): R|C| { ^ R|/C.C|(R|/a|, R|/it|) } ) } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/inplaceLambdaInControlFlowExpressions.fir.txt b/compiler/fir/analysis-tests/testData/resolve/cfg/inplaceLambdaInControlFlowExpressions.fir.txt index 5cefa8f9580..132738bf1e2 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/inplaceLambdaInControlFlowExpressions.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/inplaceLambdaInControlFlowExpressions.fir.txt @@ -5,7 +5,7 @@ FILE: inplaceLambdaInControlFlowExpressions.kt public final fun test_1(): R|kotlin/Unit| { lval x: R|kotlin/String| = when () { Boolean(true) -> { - R|kotlin/run|( = run@fun (): R|kotlin/String| { + R|kotlin/run|( = run@fun (): R|kotlin/String| { ^ R|/materialize|() } ) @@ -18,7 +18,7 @@ FILE: inplaceLambdaInControlFlowExpressions.kt } public final fun test_2(): R|kotlin/Unit| { lval x: R|kotlin/String| = try { - R|kotlin/run|( = run@fun (): R|kotlin/String| { + R|kotlin/run|( = run@fun (): R|kotlin/String| { ^ R|/materialize|() } ) @@ -29,7 +29,7 @@ FILE: inplaceLambdaInControlFlowExpressions.kt } public final fun test_3(): R|kotlin/Unit| { - lval x: R|kotlin/String| = R|kotlin/run|( = run@fun (): R|kotlin/String?| { + lval x: R|kotlin/String| = R|kotlin/run|( = run@fun (): R|kotlin/String?| { ^ R|/materialize|() } )!! diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/jumps.fir.txt b/compiler/fir/analysis-tests/testData/resolve/cfg/jumps.fir.txt index 70b306b1ba8..8db5d31af95 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/jumps.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/jumps.fir.txt @@ -55,7 +55,7 @@ FILE: jumps.kt R|/block|.R|SubstitutionOverride|() } public final fun test_6(): R|kotlin/Unit| { - R|/run|( = run@fun (): R|kotlin/Unit| { + R|/run|( = run@fun (): R|kotlin/Unit| { ^@run Unit } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaAsReturnOfLambda.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaAsReturnOfLambda.dot index 5b40cbc0a17..1b8dfc5e88d 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaAsReturnOfLambda.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaAsReturnOfLambda.dot @@ -34,7 +34,7 @@ digraph lambdaAsReturnOfLambda_kt { 13 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; } 3 [label="Postponed exit from lambda"]; - 4 [label="Jump: ^@run lambda@fun (foo: R|kotlin/String|): R|kotlin/Unit| { + 4 [label="Jump: ^@run lambda@fun (foo: R|kotlin/String|): R|kotlin/Unit| { R|/bar|(R|/foo|) } "]; diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaAsReturnOfLambda.fir.txt b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaAsReturnOfLambda.fir.txt index 69310a90f05..d2f55a0582d 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaAsReturnOfLambda.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaAsReturnOfLambda.fir.txt @@ -1,6 +1,6 @@ FILE: lambdaAsReturnOfLambda.kt - public final val x4: R|(kotlin/String) -> kotlin/Unit| = R|/run| kotlin/Unit|>( = run@fun (): R|(kotlin/String) -> kotlin/Unit| { - ^@run lambda@fun (foo: R|kotlin/String|): R|kotlin/Unit| { + public final val x4: R|(kotlin/String) -> kotlin/Unit| = R|/run| kotlin/Unit|>( = run@fun (): R|(kotlin/String) -> kotlin/Unit| { + ^@run lambda@fun (foo: R|kotlin/String|): R|kotlin/Unit| { R|/bar|(R|/foo|) } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaReturningObject.fir.txt b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaReturningObject.fir.txt index faca78a7228..aa550241391 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaReturningObject.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaReturningObject.fir.txt @@ -15,7 +15,7 @@ FILE: lambdaReturningObject.kt ^MyOut R|kotlin/TODO|() } public final fun foo(): R|kotlin/Unit| { - R|/bar|(R|/MyOut|( = MyOut@fun (): R|IrStarProjectionImpl| { + R|/bar|(R|/MyOut|( = MyOut@fun (): R|IrStarProjectionImpl| { ^ Q|IrStarProjectionImpl| } )) diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdas.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdas.dot index 8c9a84341e4..192f0f75e33 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdas.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdas.dot @@ -205,7 +205,7 @@ digraph lambdas_kt { } 64 [label="Postponed exit from lambda"]; 65 [label="Function call: R|/getInt|(...)"]; - 66 [label="Jump: ^test_3 R|/getInt|( = getInt@fun (): R|kotlin/Unit| { + 66 [label="Jump: ^test_3 R|/getInt|( = getInt@fun (): R|kotlin/Unit| { ^test_3 Int(1) } )"]; @@ -257,7 +257,7 @@ digraph lambdas_kt { } 80 [label="Postponed exit from lambda"]; 81 [label="Function call: R|/getInt|(...)"]; - 82 [label="Jump: ^test_4 R|/getInt|(block = getInt@fun (): R|kotlin/Unit| { + 82 [label="Jump: ^test_4 R|/getInt|(block = getInt@fun (): R|kotlin/Unit| { ^test_4 Int(1) } )"]; diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdas.fir.txt b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdas.fir.txt index 602beccfbad..270de8bea4c 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdas.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdas.fir.txt @@ -5,7 +5,7 @@ FILE: lambdas.kt public final fun test_1(x: R|kotlin/Any?|): R|kotlin/Unit| { when () { (R|/x| is R|kotlin/Int|) -> { - R|/run|( = run@fun (): R|kotlin/Unit| { + R|/run|( = run@fun (): R|kotlin/Unit| { R|/x|.R|kotlin/Int.inc|() } ) @@ -16,7 +16,7 @@ FILE: lambdas.kt public final fun test_2(x: R|kotlin/Any?|): R|kotlin/Unit| { when () { (R|/x| is R|kotlin/Int|) -> { - lval lambda: R|() -> kotlin/Int| = fun (): R|kotlin/Int| { + lval lambda: R|() -> kotlin/Int| = fun (): R|kotlin/Int| { ^ R|/x|.R|kotlin/Int.inc|() } @@ -29,13 +29,13 @@ FILE: lambdas.kt ^getInt Int(1) } public final fun test_3(): R|kotlin/Int| { - ^test_3 R|/getInt|( = getInt@fun (): R|kotlin/Unit| { + ^test_3 R|/getInt|( = getInt@fun (): R|kotlin/Unit| { ^test_3 Int(1) } ) } public final fun test_4(): R|kotlin/Int| { - ^test_4 R|/getInt|(block = getInt@fun (): R|kotlin/Unit| { + ^test_4 R|/getInt|(block = getInt@fun (): R|kotlin/Unit| { ^test_4 Int(1) } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/localClassesWithImplicit.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/localClassesWithImplicit.dot index a74efc7b0e4..ada79ed24ee 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/localClassesWithImplicit.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/localClassesWithImplicit.dot @@ -163,7 +163,7 @@ digraph localClassesWithImplicit_kt { } 37 [label="Postponed exit from lambda"]; 38 [label="Function call: R|/myRun|(...)"]; - 39 [label="Jump: ^foo R|/myRun|( = myRun@fun (): R|kotlin/Int| { + 39 [label="Jump: ^foo R|/myRun|( = myRun@fun (): R|kotlin/Int| { R|/a|.R|kotlin/String.length| ^ when () { (R|/b| is R|kotlin/String|) -> { @@ -245,7 +245,7 @@ digraph localClassesWithImplicit_kt { } 72 [label="Postponed exit from lambda"]; 73 [label="Function call: R|/myRun|(...)"]; - 74 [label="Jump: ^bar R|/myRun|( = myRun@fun (): R|kotlin/Int| { + 74 [label="Jump: ^bar R|/myRun|( = myRun@fun (): R|kotlin/Int| { R|/b|.# R|/a|.R|kotlin/String.length| ^ this@R|/A|.R|/A.baz|() @@ -364,7 +364,7 @@ digraph localClassesWithImplicit_kt { } 100 [label="Postponed exit from lambda"]; 101 [label="Function call: R|/myRun|(...)"]; - 102 [label="Jump: ^foo R|/myRun|( = myRun@fun (): R|kotlin/Int| { + 102 [label="Jump: ^foo R|/myRun|( = myRun@fun (): R|kotlin/Int| { R|/a|.R|kotlin/String.length| ^ when () { (R|/b| is R|kotlin/String|) -> { @@ -446,7 +446,7 @@ digraph localClassesWithImplicit_kt { } 135 [label="Postponed exit from lambda"]; 136 [label="Function call: R|/myRun|(...)"]; - 137 [label="Jump: ^bar R|/myRun|( = myRun@fun (): R|kotlin/Int| { + 137 [label="Jump: ^bar R|/myRun|( = myRun@fun (): R|kotlin/Int| { R|/a|.R|kotlin/String.length| R|/b|.# ^ this@R|/|.R|/.baz|() diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/localClassesWithImplicit.fir.txt b/compiler/fir/analysis-tests/testData/resolve/cfg/localClassesWithImplicit.fir.txt index 3e229b140ad..a47ea24421d 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/localClassesWithImplicit.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/localClassesWithImplicit.fir.txt @@ -15,7 +15,7 @@ FILE: localClassesWithImplicit.kt } public final fun foo(): R|kotlin/Int| { - ^foo R|/myRun|( = myRun@fun (): R|kotlin/Int| { + ^foo R|/myRun|( = myRun@fun (): R|kotlin/Int| { R|/a|.R|kotlin/String.length| ^ when () { (R|/b| is R|kotlin/String|) -> { @@ -32,7 +32,7 @@ FILE: localClassesWithImplicit.kt } public final fun bar(): R|kotlin/Int| { - ^bar R|/myRun|( = myRun@fun (): R|kotlin/Int| { + ^bar R|/myRun|( = myRun@fun (): R|kotlin/Int| { R|/b|.# R|/a|.R|kotlin/String.length| ^ this@R|/A|.R|/A.baz|() @@ -52,7 +52,7 @@ FILE: localClassesWithImplicit.kt } public final fun foo(): R|kotlin/Int| { - ^foo R|/myRun|( = myRun@fun (): R|kotlin/Int| { + ^foo R|/myRun|( = myRun@fun (): R|kotlin/Int| { R|/a|.R|kotlin/String.length| ^ when () { (R|/b| is R|kotlin/String|) -> { @@ -69,7 +69,7 @@ FILE: localClassesWithImplicit.kt } public final fun bar(): R|kotlin/Int| { - ^bar R|/myRun|( = myRun@fun (): R|kotlin/Int| { + ^bar R|/myRun|( = myRun@fun (): R|kotlin/Int| { R|/a|.R|kotlin/String.length| R|/b|.# ^ this@R|/|.R|/.baz|() diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInConstructor.fir.txt b/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInConstructor.fir.txt index 7b87f4be35c..2465099acfd 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInConstructor.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInConstructor.fir.txt @@ -7,8 +7,8 @@ FILE: postponedLambdaInConstructor.kt } public final class B : R|A| { public constructor(s: R|kotlin/String|): R|B| { - super(R|/s|.R|kotlin/let| kotlin/String|>( = let@fun (it: R|kotlin/String|): R|() -> kotlin/String| { - ^ let@fun (): R|kotlin/String| { + super(R|/s|.R|kotlin/let| kotlin/String|>( = let@fun (it: R|kotlin/String|): R|() -> kotlin/String| { + ^ let@fun (): R|kotlin/String| { ^ R|/it| } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdas.fir.txt b/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdas.fir.txt index 7f1ec58a3b1..79a57ee68a0 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdas.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdas.fir.txt @@ -2,7 +2,7 @@ FILE: postponedLambdas.kt public final inline fun foo(vararg x: R|kotlin/Array|): R|kotlin/Unit| { } public final fun test(a: R|kotlin/Any|, b: R|kotlin/Any|, c: R|kotlin/Any|): R|kotlin/Unit| { - R|/foo|(vararg(R|/a|, foo@fun (): R|kotlin/String| { + R|/foo|(vararg(R|/a|, foo@fun (): R|kotlin/String| { ^ String() } , R|/b|)) diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/propertiesAndInitBlocks.fir.txt b/compiler/fir/analysis-tests/testData/resolve/cfg/propertiesAndInitBlocks.fir.txt index 6f5c52dafee..74fc9b59c07 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/propertiesAndInitBlocks.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/propertiesAndInitBlocks.fir.txt @@ -11,7 +11,7 @@ FILE: propertiesAndInitBlocks.kt public set(value: R|kotlin/Int|): R|kotlin/Unit| { F|/x2| = Int(1) } - public final val x3: R|kotlin/Unit| = R|/run|( = run@fun (): R|kotlin/Unit| { + public final val x3: R|kotlin/Unit| = R|/run|( = run@fun (): R|kotlin/Unit| { local final fun foo(): R|kotlin/Unit| { lval c: R|kotlin/Int| = Int(1).R|kotlin/Int.plus|(Int(1)) throw R|java/lang/Exception.Exception|() diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/returnValuesFromLambda.fir.txt b/compiler/fir/analysis-tests/testData/resolve/cfg/returnValuesFromLambda.fir.txt index 213f36183b8..6c8db88414b 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/returnValuesFromLambda.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/returnValuesFromLambda.fir.txt @@ -14,7 +14,7 @@ FILE: returnValuesFromLambda.kt } public final fun test_1(b: R|kotlin/Boolean|): R|kotlin/Unit| { - lval x: R|A| = R|kotlin/run|( = run@fun (): R|A| { + lval x: R|A| = R|kotlin/run|( = run@fun (): R|A| { when () { R|/b| -> { ^@run R|/B.B|() @@ -26,13 +26,13 @@ FILE: returnValuesFromLambda.kt ) } public final fun test_2(): R|kotlin/Unit| { - lval x: R|C| = R|kotlin/run|( = run@fun (): R|C| { + lval x: R|C| = R|kotlin/run|( = run@fun (): R|C| { ^@run R|/C.C|() } ) } public final fun test_3(): R|kotlin/Unit| { - lval x: R|kotlin/Nothing| = R|kotlin/run|( = run@fun (): R|kotlin/Nothing| { + lval x: R|kotlin/Nothing| = R|kotlin/run|( = run@fun (): R|kotlin/Nothing| { ^test_3 Unit } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/companionObjectCall.fir.txt b/compiler/fir/analysis-tests/testData/resolve/companionObjectCall.fir.txt index 6a7b2292487..2bed6e77056 100644 --- a/compiler/fir/analysis-tests/testData/resolve/companionObjectCall.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/companionObjectCall.fir.txt @@ -6,7 +6,7 @@ FILE: companionObjectCall.kt } public final fun case1(a: R|A?|): R|kotlin/Unit| { - lval test: R|kotlin/String?| = R|/a|?.{ $subj$.R|kotlin/let|( = let@fun (it: R|A|): R|kotlin/String| { + lval test: R|kotlin/String?| = R|/a|?.{ $subj$.R|kotlin/let|( = let@fun (it: R|A|): R|kotlin/String| { Q|Case1|.R|/Case1.Companion.invoke|(R|/it|) Q|Case1|.R|/Case1.Companion.invoke|(R|/it|) ^ Q|Case1|.R|/Case1.Companion.invoke|(R|/A.A|()) diff --git a/compiler/fir/analysis-tests/testData/resolve/covariantArrayAsReceiver.fir.txt b/compiler/fir/analysis-tests/testData/resolve/covariantArrayAsReceiver.fir.txt index 49691934e4f..19ffe0798e9 100644 --- a/compiler/fir/analysis-tests/testData/resolve/covariantArrayAsReceiver.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/covariantArrayAsReceiver.fir.txt @@ -19,7 +19,7 @@ FILE: covariantArrayAsReceiver.kt public final fun foo(element: R|PsiElement|, usages: R|kotlin/Array|): R|kotlin/Unit| { lval adjusted: R|kotlin/collections/List?| = when () { (R|/element| is R|KtParameter|) -> { - R|/usages|.R|/filterNot|( = filterNot@fun (it: R|UsageInfo|): R|kotlin/Boolean| { + R|/usages|.R|/filterNot|( = filterNot@fun (it: R|UsageInfo|): R|kotlin/Boolean| { ^ (R|/it|.R|/UsageInfo.usage| is R|KtLightMethod|) } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/delegates/delegateWithLambda.fir.txt b/compiler/fir/analysis-tests/testData/resolve/delegates/delegateWithLambda.fir.txt index 53dcfa22d92..a0133e4d9d2 100644 --- a/compiler/fir/analysis-tests/testData/resolve/delegates/delegateWithLambda.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/delegates/delegateWithLambda.fir.txt @@ -23,7 +23,7 @@ FILE: delegateWithLambda.kt super() } - public final val x: R|kotlin/String|by R|/lazy|( = lazy@fun (): R|kotlin/String| { + public final val x: R|kotlin/String|by R|/lazy|( = lazy@fun (): R|kotlin/String| { lval y: R|kotlin/String| = (R|/getAny|() as? R|kotlin/String|) ?: String() ^ R|/y| } diff --git a/compiler/fir/analysis-tests/testData/resolve/delegates/extensionGenericGetValue.fir.txt b/compiler/fir/analysis-tests/testData/resolve/delegates/extensionGenericGetValue.fir.txt index 016df2dc72f..ffcb7726213 100644 --- a/compiler/fir/analysis-tests/testData/resolve/delegates/extensionGenericGetValue.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/delegates/extensionGenericGetValue.fir.txt @@ -3,12 +3,12 @@ FILE: extensionGenericGetValue.kt ^runLogged R|/action|.R|SubstitutionOverride|() } public final operator fun R|V|.getValue(receiver: R|kotlin/Any?|, p: R|kotlin/Any|): R|V| { - ^getValue R|/runLogged|( = runLogged@fun (): R|V| { + ^getValue R|/runLogged|( = runLogged@fun (): R|V| { ^ this@R|/getValue| } ) } - public final val testK: R|kotlin/String|by R|/runLogged|( = runLogged@fun (): R|kotlin/String| { + public final val testK: R|kotlin/String|by R|/runLogged|( = runLogged@fun (): R|kotlin/String| { ^ String(K) } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/delegates/extensionGetValueWithTypeVariableAsReceiver.fir.txt b/compiler/fir/analysis-tests/testData/resolve/delegates/extensionGetValueWithTypeVariableAsReceiver.fir.txt index 900eba0d010..32634ea4e44 100644 --- a/compiler/fir/analysis-tests/testData/resolve/delegates/extensionGetValueWithTypeVariableAsReceiver.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/delegates/extensionGetValueWithTypeVariableAsReceiver.fir.txt @@ -3,12 +3,12 @@ FILE: extensionGetValueWithTypeVariableAsReceiver.kt ^runLogged R|/action|.R|SubstitutionOverride|() } public final operator fun R|kotlin/String|.getValue(receiver: R|kotlin/Any?|, p: R|kotlin/Any|): R|kotlin/String| { - ^getValue R|/runLogged|( = runLogged@fun (): R|kotlin/String| { + ^getValue R|/runLogged|( = runLogged@fun (): R|kotlin/String| { ^ this@R|/getValue| } ) } - public final val testK: R|kotlin/String|by R|/runLogged|( = runLogged@fun (): R|kotlin/String| { + public final val testK: R|kotlin/String|by R|/runLogged|( = runLogged@fun (): R|kotlin/String| { ^ String(K) } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/delegates/kt41982.fir.txt b/compiler/fir/analysis-tests/testData/resolve/delegates/kt41982.fir.txt index baec6ec1789..cb7c6ae120f 100644 --- a/compiler/fir/analysis-tests/testData/resolve/delegates/kt41982.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/delegates/kt41982.fir.txt @@ -26,7 +26,7 @@ FILE: kt41982.kt super|>() } - public final var start: R|kotlin/Long|by this@R|/Test|.R|/long|( = long@fun (): R|kotlin/Long?| { + public final var start: R|kotlin/Long|by this@R|/Test|.R|/long|( = long@fun (): R|kotlin/Long?| { ^ Long(0) } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/diagnostics/functionAsExpression/Parameters.fir.txt b/compiler/fir/analysis-tests/testData/resolve/diagnostics/functionAsExpression/Parameters.fir.txt index ca542e88a54..ebc7317e472 100644 --- a/compiler/fir/analysis-tests/testData/resolve/diagnostics/functionAsExpression/Parameters.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/diagnostics/functionAsExpression/Parameters.fir.txt @@ -1,45 +1,45 @@ FILE: Parameters.kt - public final val bar: R|(kotlin/Int) -> kotlin/Unit| = fun (p: R|kotlin/Int| = Int(3)): R|kotlin/Unit| { + public final val bar: R|(kotlin/Int) -> kotlin/Unit| = fun (p: R|kotlin/Int| = Int(3)): R|kotlin/Unit| { } public get(): R|(kotlin/Int) -> kotlin/Unit| - public final val bas: R|(kotlin/Int) -> kotlin/Unit| = fun (vararg p: R|kotlin/Int|): R|kotlin/Unit| { + public final val bas: R|(kotlin/Int) -> kotlin/Unit| = fun (vararg p: R|kotlin/Int|): R|kotlin/Unit| { } public get(): R|(kotlin/Int) -> kotlin/Unit| public final fun gar(): R|(kotlin/Int) -> kotlin/Unit| { - ^gar fun (p: R|kotlin/Int| = Int(3)): R|kotlin/Unit| { + ^gar fun (p: R|kotlin/Int| = Int(3)): R|kotlin/Unit| { } } public final fun gas(): R|(kotlin/Int) -> kotlin/Unit| { - ^gas fun (vararg p: R|kotlin/Int|): R|kotlin/Unit| { + ^gas fun (vararg p: R|kotlin/Int|): R|kotlin/Unit| { } } public final fun outer(b: R|kotlin/Any?|): R|kotlin/Unit| { - lval bar: R|(kotlin/Int) -> kotlin/Unit| = fun (p: R|kotlin/Int| = Int(3)): R|kotlin/Unit| { + lval bar: R|(kotlin/Int) -> kotlin/Unit| = fun (p: R|kotlin/Int| = Int(3)): R|kotlin/Unit| { } - lval bas: R|(kotlin/Int) -> kotlin/Unit| = fun (vararg p: R|kotlin/Int|): R|kotlin/Unit| { + lval bas: R|(kotlin/Int) -> kotlin/Unit| = fun (vararg p: R|kotlin/Int|): R|kotlin/Unit| { } local final fun gar(): R|(kotlin/Int) -> kotlin/Unit| { - ^gar fun (p: R|kotlin/Int| = Int(3)): R|kotlin/Unit| { + ^gar fun (p: R|kotlin/Int| = Int(3)): R|kotlin/Unit| { } } local final fun gas(): R|(kotlin/Int) -> kotlin/Unit| { - ^gas fun (vararg p: R|kotlin/Int|): R|kotlin/Unit| { + ^gas fun (vararg p: R|kotlin/Int|): R|kotlin/Unit| { } } - R|/outer|(fun (p: R|kotlin/Int| = Int(3)): R|kotlin/Unit| { + R|/outer|(fun (p: R|kotlin/Int| = Int(3)): R|kotlin/Unit| { } ) - R|/outer|(fun (vararg p: R|kotlin/Int|): R|kotlin/Unit| { + R|/outer|(fun (vararg p: R|kotlin/Int|): R|kotlin/Unit| { } ) } diff --git a/compiler/fir/analysis-tests/testData/resolve/diagnostics/instanceAccessBeforeSuperCall.fir.txt b/compiler/fir/analysis-tests/testData/resolve/diagnostics/instanceAccessBeforeSuperCall.fir.txt index 5eb272b5c7f..e2b537fd74f 100644 --- a/compiler/fir/analysis-tests/testData/resolve/diagnostics/instanceAccessBeforeSuperCall.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/diagnostics/instanceAccessBeforeSuperCall.fir.txt @@ -25,7 +25,7 @@ FILE: instanceAccessBeforeSuperCall.kt } public constructor(x: R|kotlin/Int|): R|C| { - this(fun (): R|ERROR CLASS: Cannot access '''' before superclass constructor has been called| { + this(fun (): R|ERROR CLASS: Cannot access '''' before superclass constructor has been called| { lval a: R|kotlin/Int| = Int(10) ^ this@R|/C| } @@ -47,13 +47,13 @@ FILE: instanceAccessBeforeSuperCall.kt public final fun main(): R|kotlin/Unit| { lval x1: R|kotlin/String.() -> kotlin/String| = when () { Boolean(true) -> { - fun R|kotlin/String|.(): R|kotlin/String| { + fun R|kotlin/String|.(): R|kotlin/String| { ^ this@R|special/anonymous| } } else -> { - fun R|kotlin/String|.(): R|kotlin/String| { + fun R|kotlin/String|.(): R|kotlin/String| { ^ this@R|special/anonymous| } @@ -75,7 +75,7 @@ FILE: instanceAccessBeforeSuperCall.kt public set(value: R|kotlin/Int|): R|kotlin/Unit| public constructor(x: R|kotlin/Int|): R|F| { - this(R|/x|, R|/x|, fun (): R|kotlin/Unit| { + this(R|/x|, R|/x|, fun (): R|kotlin/Unit| { lval a: R|kotlin/Int| = Int(10) this@R|/F| R|/test|(this@R|/F|) diff --git a/compiler/fir/analysis-tests/testData/resolve/diagnostics/superIsNotAnExpression.fir.txt b/compiler/fir/analysis-tests/testData/resolve/diagnostics/superIsNotAnExpression.fir.txt index 304448a68f5..3af57a5c5a0 100644 --- a/compiler/fir/analysis-tests/testData/resolve/diagnostics/superIsNotAnExpression.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/diagnostics/superIsNotAnExpression.fir.txt @@ -13,7 +13,7 @@ FILE: superIsNotAnExpression.kt public final fun act(): R|kotlin/Unit| { #() #() - #( = @fun (): R|ERROR CLASS: Unresolved name: println| { + #( = @fun (): R|ERROR CLASS: Unresolved name: println| { ^ #(ERROR_EXPR(Incorrect character: 'weird')) } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/negative/nonExhaustiveWhenWithoutCoercionToUnit.fir.txt b/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/negative/nonExhaustiveWhenWithoutCoercionToUnit.fir.txt index 3dbef094d39..c30ae85e9c5 100644 --- a/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/negative/nonExhaustiveWhenWithoutCoercionToUnit.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/negative/nonExhaustiveWhenWithoutCoercionToUnit.fir.txt @@ -3,7 +3,7 @@ FILE: nonExhaustiveWhenWithoutCoercionToUnit.kt ^run R|/block|.R|SubstitutionOverride|() } public final fun test(a: R|kotlin/Any|): R|kotlin/Unit| { - R|/run|( = run@fun (): R|kotlin/Unit| { + R|/run|( = run@fun (): R|kotlin/Unit| { when (R|/a|) { ($subj$ is R|kotlin/String|) -> { Int(1) diff --git a/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/positive/nestedIfInLambda.fir.txt b/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/positive/nestedIfInLambda.fir.txt index 468e5d76177..bf668bdd79d 100644 --- a/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/positive/nestedIfInLambda.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/positive/nestedIfInLambda.fir.txt @@ -3,7 +3,7 @@ FILE: nestedIfInLambda.kt } public final fun test(b1: R|kotlin/Boolean|, b2: R|kotlin/Boolean|): R|kotlin/Unit| { lvar result: R|kotlin/Boolean| = Boolean(false) - R|/run|( = run@fun (): R|kotlin/Unit| { + R|/run|( = run@fun (): R|kotlin/Unit| { when () { R|/b1| -> { when () { diff --git a/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/positive/nonExhaustiveWhenWithCoercionToUnit.fir.txt b/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/positive/nonExhaustiveWhenWithCoercionToUnit.fir.txt index 3c426b78f6e..463adeca62b 100644 --- a/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/positive/nonExhaustiveWhenWithCoercionToUnit.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/positive/nonExhaustiveWhenWithCoercionToUnit.fir.txt @@ -3,7 +3,7 @@ FILE: nonExhaustiveWhenWithCoercionToUnit.kt ^run R|/block|.R|SubstitutionOverride|() } public final fun test(a: R|kotlin/Any|, b: R|kotlin/Boolean|): R|kotlin/Unit| { - R|/run|( = run@fun (): R|kotlin/Unit| { + R|/run|( = run@fun (): R|kotlin/Unit| { when () { R|/b| -> { ^@run Unit diff --git a/compiler/fir/analysis-tests/testData/resolve/expresssions/CallBasedInExpressionGenerator.fir.txt b/compiler/fir/analysis-tests/testData/resolve/expresssions/CallBasedInExpressionGenerator.fir.txt index 25fc8971ece..7ede4a51353 100644 --- a/compiler/fir/analysis-tests/testData/resolve/expresssions/CallBasedInExpressionGenerator.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/expresssions/CallBasedInExpressionGenerator.fir.txt @@ -36,7 +36,7 @@ FILE: CallBasedInExpressionGenerator.kt private get(): R|kotlin/Boolean| public final override fun generate(argument: R|org/jetbrains/kotlin/codegen/range/inExpression/StackValue|): R|org/jetbrains/kotlin/codegen/range/inExpression/BranchedValue| { - ^generate this@R|org/jetbrains/kotlin/codegen/range/inExpression/CallBasedInExpressionGenerator|.R|org/jetbrains/kotlin/codegen/range/inExpression/CallBasedInExpressionGenerator.gen|(R|/argument|).R|kotlin/let|( = let@fun (it: R|org/jetbrains/kotlin/codegen/range/inExpression/BranchedValue|): R|org/jetbrains/kotlin/codegen/range/inExpression/BranchedValue| { + ^generate this@R|org/jetbrains/kotlin/codegen/range/inExpression/CallBasedInExpressionGenerator|.R|org/jetbrains/kotlin/codegen/range/inExpression/CallBasedInExpressionGenerator.gen|(R|/argument|).R|kotlin/let|( = let@fun (it: R|org/jetbrains/kotlin/codegen/range/inExpression/BranchedValue|): R|org/jetbrains/kotlin/codegen/range/inExpression/BranchedValue| { ^ when () { this@R|org/jetbrains/kotlin/codegen/range/inExpression/CallBasedInExpressionGenerator|.R|org/jetbrains/kotlin/codegen/range/inExpression/CallBasedInExpressionGenerator.isInverted| -> { #(R|/it|) diff --git a/compiler/fir/analysis-tests/testData/resolve/expresssions/extensionPropertyInLambda.fir.txt b/compiler/fir/analysis-tests/testData/resolve/expresssions/extensionPropertyInLambda.fir.txt index 72d2d257345..c47dd37e479 100644 --- a/compiler/fir/analysis-tests/testData/resolve/expresssions/extensionPropertyInLambda.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/expresssions/extensionPropertyInLambda.fir.txt @@ -19,7 +19,7 @@ FILE: extensionPropertyInLambda.kt public final fun use(f: R|() -> kotlin/String|): R|kotlin/Unit| { } public final fun test1(): R|kotlin/Unit| { - R|/use|( = use@fun (): R|kotlin/String| { + R|/use|( = use@fun (): R|kotlin/String| { ^ R|/C.C|(String(abc)).R|/y| } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/expresssions/invoke/doubleBrackets.fir.txt b/compiler/fir/analysis-tests/testData/resolve/expresssions/invoke/doubleBrackets.fir.txt index d064ae533b2..4431a10c5e0 100644 --- a/compiler/fir/analysis-tests/testData/resolve/expresssions/invoke/doubleBrackets.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/expresssions/invoke/doubleBrackets.fir.txt @@ -1,6 +1,6 @@ FILE: doubleBrackets.kt public final fun R|kotlin/String|.k(): R|() -> kotlin/String| { - ^k fun (): R|kotlin/String| { + ^k fun (): R|kotlin/String| { ^ this@R|/k| } diff --git a/compiler/fir/analysis-tests/testData/resolve/expresssions/invoke/threeReceiversCorrect.fir.txt b/compiler/fir/analysis-tests/testData/resolve/expresssions/invoke/threeReceiversCorrect.fir.txt index 89bb1a4657b..d2e9e007b0d 100644 --- a/compiler/fir/analysis-tests/testData/resolve/expresssions/invoke/threeReceiversCorrect.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/expresssions/invoke/threeReceiversCorrect.fir.txt @@ -26,14 +26,14 @@ FILE: threeReceiversCorrect.kt ^with R|/f|.R|SubstitutionOverride|(R|/arg|) } public final fun test(a: R|A|, b: R|B|, c: R|C|): R|kotlin/Unit| { - R|/with|(R|/a|, = with@fun R|A|.(): R|kotlin/Unit| { - R|/with|(R|/c|, = with@fun R|C|.(): R|kotlin/Unit| { + R|/with|(R|/a|, = with@fun R|A|.(): R|kotlin/Unit| { + R|/with|(R|/c|, = with@fun R|C|.(): R|kotlin/Unit| { (this@R|special/anonymous|, R|/b|).R|/A.foo|.R|SubstitutionOverride|(R|/c|) } ) - ^ R|/with|(R|/b|, = with@fun R|B|.(): R|kotlin/Unit| { + ^ R|/with|(R|/b|, = with@fun R|B|.(): R|kotlin/Unit| { (this@R|special/anonymous|, this@R|special/anonymous|).R|/A.foo|.R|SubstitutionOverride|(R|/c|) - ^ R|/with|(R|/c|, = with@fun R|C|.(): R|kotlin/Unit| { + ^ R|/with|(R|/c|, = with@fun R|C|.(): R|kotlin/Unit| { (this@R|special/anonymous|, this@R|special/anonymous|).R|/A.foo|.R|SubstitutionOverride|(this@R|special/anonymous|) } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/expresssions/lambda.fir.txt b/compiler/fir/analysis-tests/testData/resolve/expresssions/lambda.fir.txt index f70f440369d..bf2831091f9 100644 --- a/compiler/fir/analysis-tests/testData/resolve/expresssions/lambda.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/expresssions/lambda.fir.txt @@ -8,32 +8,32 @@ FILE: lambda.kt public final fun multipleArgs(block: R|(kotlin/String, kotlin/String) -> kotlin/String|): R|kotlin/Unit| { } public final fun main(): R|kotlin/Unit| { - R|/foo|( = foo@fun (): R|kotlin/Unit| { + R|/foo|( = foo@fun (): R|kotlin/Unit| { String(This is test) } ) - R|/bar|( = bar@fun (): R|kotlin/String| { + R|/bar|( = bar@fun (): R|kotlin/String| { ^ String(This is also test) } ) - R|/itIs|( = itIs@fun (it: R|kotlin/String|): R|kotlin/String| { + R|/itIs|( = itIs@fun (it: R|kotlin/String|): R|kotlin/String| { ^ (String(this is ), R|/it|.R|kotlin/Any.toString|(), String( test)) } ) - R|/multipleArgs|( = multipleArgs@fun (a: R|kotlin/String|, b: R|kotlin/String|): R|kotlin/String| { + R|/multipleArgs|( = multipleArgs@fun (a: R|kotlin/String|, b: R|kotlin/String|): R|kotlin/String| { ^ (String(This is test of ), R|/a|.R|kotlin/Any.toString|(), String(, ), R|/b|.R|kotlin/Any.toString|()) } ) - lval s: R|kotlin/String| = fun (): R|kotlin/String| { + lval s: R|kotlin/String| = fun (): R|kotlin/String| { ^ String(OK) } .R|SubstitutionOverride|() - lval f: R|() -> kotlin/String| = fun (): R|kotlin/String| { + lval f: R|() -> kotlin/String| = fun (): R|kotlin/String| { ^ String(OK) } lval ss: R|kotlin/String| = R|/f|.R|SubstitutionOverride|() - lval empty: R|() -> kotlin/Unit| = fun (): R|kotlin/Unit| { + lval empty: R|() -> kotlin/Unit| = fun (): R|kotlin/Unit| { ^ Unit } diff --git a/compiler/fir/analysis-tests/testData/resolve/expresssions/lambdaWithReceiver.fir.txt b/compiler/fir/analysis-tests/testData/resolve/expresssions/lambdaWithReceiver.fir.txt index 23237bddc31..395a0fd7ed8 100644 --- a/compiler/fir/analysis-tests/testData/resolve/expresssions/lambdaWithReceiver.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/expresssions/lambdaWithReceiver.fir.txt @@ -12,19 +12,19 @@ FILE: lambdaWithReceiver.kt public final fun withA(block: R|A.() -> kotlin/Unit|): R|kotlin/Unit| { } public final fun test_1(): R|kotlin/Unit| { - R|/withA|( = withA@fun R|A|.(): R|kotlin/Unit| { + R|/withA|( = withA@fun R|A|.(): R|kotlin/Unit| { 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| { + R|/myWith|(R|/a|, = myWith@fun R|A|.(): R|kotlin/Unit| { 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| { + R|/a|.R|/myApply|( = myApply@fun R|A|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|/A.foo|() } ) @@ -32,7 +32,7 @@ FILE: lambdaWithReceiver.kt public final fun complexLambda(block: R|kotlin/Int.(kotlin/String) -> kotlin/Unit|): R|kotlin/Unit| { } public final fun test_4(): R|kotlin/Unit| { - R|/complexLambda|( = complexLambda@fun R|kotlin/Int|.(it: R|kotlin/String|): R|kotlin/Unit| { + R|/complexLambda|( = complexLambda@fun R|kotlin/Int|.(it: R|kotlin/String|): R|kotlin/Unit| { 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/analysis-tests/testData/resolve/extendedCheckers/CanBeValChecker.fir.txt b/compiler/fir/analysis-tests/testData/resolve/extendedCheckers/CanBeValChecker.fir.txt index fcaef44d599..f0f6f92e02d 100644 --- a/compiler/fir/analysis-tests/testData/resolve/extendedCheckers/CanBeValChecker.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/extendedCheckers/CanBeValChecker.fir.txt @@ -92,7 +92,7 @@ FILE: CanBeValChecker.kt R|kotlin/io/print|(R|/v|) } public final fun withReadonlyDeligate(): R|kotlin/Unit| { - lval s: R|kotlin/String|by R|kotlin/lazy|( = lazy@fun (): R|kotlin/String| { + lval s: R|kotlin/String|by R|kotlin/lazy|( = lazy@fun (): R|kotlin/String| { ^ String(Hello!) } ) @@ -189,14 +189,14 @@ FILE: CanBeValChecker.kt public final fun lambda(): R|kotlin/Unit| { lvar a: R|kotlin/Int| R|/a| = Int(10) - R|/run|( = run@fun (): R|kotlin/Unit| { + R|/run|( = run@fun (): R|kotlin/Unit| { R|/a| = Int(20) } ) } public final fun lambdaInitialization(): R|kotlin/Unit| { lvar a: R|kotlin/Int| - R|/run|( = run@fun (): R|kotlin/Unit| { + R|/run|( = run@fun (): R|kotlin/Unit| { R|/a| = Int(20) } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/extendedCheckers/RedundantReturnUnitTypeChecker.fir.txt b/compiler/fir/analysis-tests/testData/resolve/extendedCheckers/RedundantReturnUnitTypeChecker.fir.txt index 598098cb0e4..6e2bc788e52 100644 --- a/compiler/fir/analysis-tests/testData/resolve/extendedCheckers/RedundantReturnUnitTypeChecker.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/extendedCheckers/RedundantReturnUnitTypeChecker.fir.txt @@ -59,7 +59,7 @@ FILE: RedundantReturnUnitTypeChecker.kt } public final fun foo(): R|kotlin/Unit| { - ^foo this@R|/B|.R|/B.run|( = run@fun (): R|kotlin/Unit| { + ^foo this@R|/B|.R|/B.run|( = run@fun (): R|kotlin/Unit| { this@R|/B|.R|/B.bar|() } ) @@ -74,7 +74,7 @@ FILE: RedundantReturnUnitTypeChecker.kt } public final fun boo(): R|kotlin/Unit| { - ^boo this@R|/B|.R|/B.call|( = call@fun (): R|kotlin/Unit| { + ^boo this@R|/B|.R|/B.call|( = call@fun (): R|kotlin/Unit| { this@R|/B|.R|/B.baz|() } ) @@ -88,7 +88,7 @@ FILE: RedundantReturnUnitTypeChecker.kt } public final fun goo(): R|kotlin/Unit| { - ^goo (this@R|/B|, Int(1)).R|/B.let|( = let@fun (it: R|kotlin/Int|): R|kotlin/Unit| { + ^goo (this@R|/B|, Int(1)).R|/B.let|( = let@fun (it: R|kotlin/Int|): R|kotlin/Unit| { this@R|/B|.R|/B.bar|() } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/extendedCheckers/UselessCallOnNotNullChecker/NotNullTypeChain.fir.txt b/compiler/fir/analysis-tests/testData/resolve/extendedCheckers/UselessCallOnNotNullChecker/NotNullTypeChain.fir.txt index 8e2385f983a..96caae7431d 100644 --- a/compiler/fir/analysis-tests/testData/resolve/extendedCheckers/UselessCallOnNotNullChecker/NotNullTypeChain.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/extendedCheckers/UselessCallOnNotNullChecker/NotNullTypeChain.fir.txt @@ -1,7 +1,7 @@ FILE: NotNullTypeChain.kt public final val list1: R|kotlin/collections/List| = R|kotlin/collections/listOf|(Int(1)) public get(): R|kotlin/collections/List| - public final val list: R|kotlin/collections/List| = R|/list1|.R|kotlin/collections/orEmpty|().R|kotlin/collections/map|( = map@fun (it: R|kotlin/Int|): R|kotlin/String| { + public final val list: R|kotlin/collections/List| = R|/list1|.R|kotlin/collections/orEmpty|().R|kotlin/collections/map|( = map@fun (it: R|kotlin/Int|): R|kotlin/String| { ^ (R|/it|.R|kotlin/Any.toString|()) } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/extendedCheckers/unused/invoke.fir.txt b/compiler/fir/analysis-tests/testData/resolve/extendedCheckers/unused/invoke.fir.txt index cf32a300edb..9de4eca1d4a 100644 --- a/compiler/fir/analysis-tests/testData/resolve/extendedCheckers/unused/invoke.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/extendedCheckers/unused/invoke.fir.txt @@ -1,10 +1,10 @@ FILE: invoke.kt public final fun foo(): R|kotlin/Int| { - lval x: R|() -> kotlin/Int| = fun (): R|kotlin/Int| { + lval x: R|() -> kotlin/Int| = fun (): R|kotlin/Int| { ^ Int(4) } - lval y: R|() -> kotlin/Int| = fun (): R|kotlin/Int| { + lval y: R|() -> kotlin/Int| = fun (): R|kotlin/Int| { ^ Int(2) } diff --git a/compiler/fir/analysis-tests/testData/resolve/extendedCheckers/unused/lambda.fir.txt b/compiler/fir/analysis-tests/testData/resolve/extendedCheckers/unused/lambda.fir.txt index 8732d89b696..9ccdbdcf66e 100644 --- a/compiler/fir/analysis-tests/testData/resolve/extendedCheckers/unused/lambda.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/extendedCheckers/unused/lambda.fir.txt @@ -3,7 +3,7 @@ FILE: lambda.kt Int(1).R|kotlin/run|(R|/t|) } public final fun main(): R|kotlin/Unit| { - R|/f|( = f@fun (i: R|kotlin/Int|): R|kotlin/Unit| { + R|/f|( = f@fun (i: R|kotlin/Int|): R|kotlin/Unit| { ^@f Unit } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/functionTypeAlias.fir.txt b/compiler/fir/analysis-tests/testData/resolve/functionTypeAlias.fir.txt index 83fa85a04ab..372ade22496 100644 --- a/compiler/fir/analysis-tests/testData/resolve/functionTypeAlias.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/functionTypeAlias.fir.txt @@ -4,7 +4,7 @@ FILE: functionTypeAlias.kt R|/a|.R|SubstitutionOverride|(String(b), Int(1)) } public final fun main(): R|kotlin/Unit| { - R|/b|( = b@fun R|kotlin/String|.(it: R|kotlin/Int|): R|kotlin/Int| { + R|/b|( = b@fun R|kotlin/String|.(it: R|kotlin/Int|): R|kotlin/Int| { ^ this@R|special/anonymous|.R|kotlin/String.length|.R|kotlin/Int.plus|(R|/it|) } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/inference/coercionToUnitWithEarlyReturn.fir.txt b/compiler/fir/analysis-tests/testData/resolve/inference/coercionToUnitWithEarlyReturn.fir.txt index e04a089fcf3..aa2e21b484d 100644 --- a/compiler/fir/analysis-tests/testData/resolve/inference/coercionToUnitWithEarlyReturn.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/inference/coercionToUnitWithEarlyReturn.fir.txt @@ -11,7 +11,7 @@ FILE: coercionToUnitWithEarlyReturn.kt public final fun foo(x: R|() -> kotlin/Unit|): R|kotlin/Unit| { } public final fun main(x: R|A?|): R|kotlin/Unit| { - lval lambda: R|() -> kotlin/Unit| = l@fun (): R|kotlin/Unit| { + lval lambda: R|() -> kotlin/Unit| = l@fun (): R|kotlin/Unit| { when () { ==(R|/x|?.{ $subj$.R|kotlin/Any.hashCode|() }, Int(0)) -> { ^@l Unit diff --git a/compiler/fir/analysis-tests/testData/resolve/inference/kt41989.fir.txt b/compiler/fir/analysis-tests/testData/resolve/inference/kt41989.fir.txt index 4bf76840f42..7621d6ec34d 100644 --- a/compiler/fir/analysis-tests/testData/resolve/inference/kt41989.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/inference/kt41989.fir.txt @@ -12,7 +12,7 @@ FILE: kt41989.kt public get(): R|A.() -> kotlin/Unit| { ^ when () { R|/cond|() -> { - fun R|A|.(): R|kotlin/Unit| { + fun R|A|.(): R|kotlin/Unit| { (this@R|/C|, this@R|special/anonymous|).R|/B.withBottomBorder|() } diff --git a/compiler/fir/analysis-tests/testData/resolve/inference/lambdaAsReturnStatementOfLambda.fir.txt b/compiler/fir/analysis-tests/testData/resolve/inference/lambdaAsReturnStatementOfLambda.fir.txt index cbf479d8627..812a6461fbf 100644 --- a/compiler/fir/analysis-tests/testData/resolve/inference/lambdaAsReturnStatementOfLambda.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/inference/lambdaAsReturnStatementOfLambda.fir.txt @@ -6,8 +6,8 @@ FILE: lambdaAsReturnStatementOfLambda.kt } public final fun test(a: R|A|): R|kotlin/Unit| { - lval lambda: R|() -> A| = R|/a|.R|kotlin/let| A|>( = let@fun (it: R|A|): R|() -> A| { - ^ let@fun (): R|A| { + lval lambda: R|() -> A| = R|/a|.R|kotlin/let| A|>( = let@fun (it: R|A|): R|() -> A| { + ^ let@fun (): R|A| { ^ R|/it| } diff --git a/compiler/fir/analysis-tests/testData/resolve/inference/lambdaInElvis.fir.txt b/compiler/fir/analysis-tests/testData/resolve/inference/lambdaInElvis.fir.txt index 89685979c73..22b9ecb9903 100644 --- a/compiler/fir/analysis-tests/testData/resolve/inference/lambdaInElvis.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/inference/lambdaInElvis.fir.txt @@ -8,13 +8,13 @@ FILE: lambdaInElvis.kt ^listOf R|kotlin/TODO|() } public final fun bar1(w: R|kotlin/collections/List|): R|kotlin/collections/List?| { - ^bar1 R|/foo|( = foo@fun (container: R|kotlin/collections/MutableList|): R|kotlin/Unit| { + ^bar1 R|/foo|( = foo@fun (container: R|kotlin/collections/MutableList|): R|kotlin/Unit| { R|/container|.R|SubstitutionOverride|(String()) } ) ?: R|/w| } public final fun bar2(): R|kotlin/collections/List?| { - ^bar2 R|/foo|( = foo@fun (container: R|kotlin/collections/MutableList|): R|kotlin/Unit| { + ^bar2 R|/foo|( = foo@fun (container: R|kotlin/collections/MutableList|): R|kotlin/Unit| { R|/container|.R|SubstitutionOverride|(String()) } ) ?: R|/listOf|() diff --git a/compiler/fir/analysis-tests/testData/resolve/inference/lambdasReturns.fir.txt b/compiler/fir/analysis-tests/testData/resolve/inference/lambdasReturns.fir.txt index 4f178aecddb..a7a943643c4 100644 --- a/compiler/fir/analysis-tests/testData/resolve/inference/lambdasReturns.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/inference/lambdasReturns.fir.txt @@ -6,7 +6,7 @@ FILE: lambdasReturns.kt ^materialize R|kotlin/TODO|() } public final fun foo(x: R|kotlin/String?|): R|kotlin/Unit| { - lval r: R|kotlin/Int| = R|/myRun|( = myRun@fun (): R|kotlin/Int| { + lval r: R|kotlin/Int| = R|/myRun|( = myRun@fun (): R|kotlin/Int| { lval y: R|kotlin/String| = R|/x| ?: ^@myRun R|/materialize|() ^ R|/y|.R|kotlin/String.length| } diff --git a/compiler/fir/analysis-tests/testData/resolve/inference/nestedLambdas.fir.txt b/compiler/fir/analysis-tests/testData/resolve/inference/nestedLambdas.fir.txt index 3c4f6532ae3..9005708d88e 100644 --- a/compiler/fir/analysis-tests/testData/resolve/inference/nestedLambdas.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/inference/nestedLambdas.fir.txt @@ -17,8 +17,8 @@ FILE: nestedLambdas.kt public final fun R|Inv|.associateBy1(keySelector: R|(X) -> K|): R|MyMap| { ^associateBy1 R|kotlin/TODO|() } - public final val x: R|MyMap| = R|/myRun||>( = myRun@fun (): R|MyMap| { - ^ R|/w|.R|/associateBy1|( = associateBy1@fun (f: R|kotlin/String|): R|kotlin/Int| { + public final val x: R|MyMap| = R|/myRun||>( = myRun@fun (): R|MyMap| { + ^ R|/w|.R|/associateBy1|( = associateBy1@fun (f: R|kotlin/String|): R|kotlin/Int| { ^ R|/f|.R|kotlin/String.length| } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/inference/typeDepthForTypeAlias.fir.txt b/compiler/fir/analysis-tests/testData/resolve/inference/typeDepthForTypeAlias.fir.txt index 78bf46c7d12..351c2259e6a 100644 --- a/compiler/fir/analysis-tests/testData/resolve/inference/typeDepthForTypeAlias.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/inference/typeDepthForTypeAlias.fir.txt @@ -3,7 +3,7 @@ FILE: typeDepthForTypeAlias.kt public final fun R|SymbolToTransformer|.add(): R|kotlin/Unit| { } public final fun foo(symbolToTransformer: R|SymbolToTransformer|): R|kotlin/Unit| { - R|/symbolToTransformer|.R|/myApply|>|>( = myApply@fun R|kotlin/collections/MutableMap>|.(): R|kotlin/Unit| { + R|/symbolToTransformer|.R|/myApply|>|>( = myApply@fun R|kotlin/collections/MutableMap>|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|/add|() } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/innerClasses/innerTypeFromSuperClassInBody.fir.txt b/compiler/fir/analysis-tests/testData/resolve/innerClasses/innerTypeFromSuperClassInBody.fir.txt index 2348d9696df..972aca97d6d 100644 --- a/compiler/fir/analysis-tests/testData/resolve/innerClasses/innerTypeFromSuperClassInBody.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/innerClasses/innerTypeFromSuperClassInBody.fir.txt @@ -21,7 +21,7 @@ FILE: innerTypeFromSuperClassInBody.kt } public final fun bar(): R|kotlin/Unit| { - lval y: R|A.Inner.() -> kotlin/Unit| = fun R|A.Inner|.(): R|kotlin/Unit| { + lval y: R|A.Inner.() -> kotlin/Unit| = fun R|A.Inner|.(): R|kotlin/Unit| { ^ Unit } diff --git a/compiler/fir/analysis-tests/testData/resolve/labelAndReceiverForInfix.fir.txt b/compiler/fir/analysis-tests/testData/resolve/labelAndReceiverForInfix.fir.txt index 24a275d7817..c89c501642e 100644 --- a/compiler/fir/analysis-tests/testData/resolve/labelAndReceiverForInfix.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/labelAndReceiverForInfix.fir.txt @@ -11,10 +11,10 @@ FILE: labelAndReceiverForInfix.kt public final infix fun R|() -> kotlin/Unit|.foo(x: R|A.() -> kotlin/Unit|): R|kotlin/Unit| { } public final fun main(): R|kotlin/Unit| { - foo@fun (): R|kotlin/Unit| { + foo@fun (): R|kotlin/Unit| { ^@foo Unit } - .R|/foo|(foo@fun R|A|.(): R|kotlin/Unit| { + .R|/foo|(foo@fun R|A|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|/A.bar|() ^@foo Unit } diff --git a/compiler/fir/analysis-tests/testData/resolve/lambdaArgInScopeFunction.fir.txt b/compiler/fir/analysis-tests/testData/resolve/lambdaArgInScopeFunction.fir.txt index 48797a8dc12..658873e3976 100644 --- a/compiler/fir/analysis-tests/testData/resolve/lambdaArgInScopeFunction.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/lambdaArgInScopeFunction.fir.txt @@ -13,43 +13,43 @@ FILE: lambdaArgInScopeFunction.kt } public final fun case1(kotlinClass: R|KotlinClass?|): R|kotlin/Unit| { - lval value: R|KotlinClass?| = R|/kotlinClass|?.{ $subj$.R|kotlin/let|( = let@fun (it: R|KotlinClass|): R|KotlinClass| { + lval value: R|KotlinClass?| = R|/kotlinClass|?.{ $subj$.R|kotlin/let|( = let@fun (it: R|KotlinClass|): R|KotlinClass| { ^ R|/it| } ) } - R|/value|.R|/checkType|( = checkType@fun R|CheckTypeInv|.(): R|kotlin/Unit| { + R|/value|.R|/checkType|( = checkType@fun R|CheckTypeInv|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|/_|() } ) - lval lambda: R|() -> KotlinClass| = R|/kotlinClass|?.{ $subj$.R|kotlin/let| KotlinClass|>( = let@fun (it: R|KotlinClass|): R|() -> KotlinClass| { - ^ let@fun (): R|KotlinClass| { + lval lambda: R|() -> KotlinClass| = R|/kotlinClass|?.{ $subj$.R|kotlin/let| KotlinClass|>( = let@fun (it: R|KotlinClass|): R|() -> KotlinClass| { + ^ let@fun (): R|KotlinClass| { ^ R|/it| } } ) } - R|/lambda|.R|/checkType| KotlinClass|>( = checkType@fun R|CheckTypeInv?>|.(): R|kotlin/Unit| { + R|/lambda|.R|/checkType| KotlinClass|>( = checkType@fun R|CheckTypeInv?>|.(): R|kotlin/Unit| { this@R|special/anonymous|.# KotlinClass?|>() } ) } public final fun case2(kotlinClass: R|KotlinClass|): R|kotlin/Unit| { - lval value: R|KotlinClass| = R|/kotlinClass|.R|kotlin/let|( = let@fun (it: R|KotlinClass|): R|KotlinClass| { + lval value: R|KotlinClass| = R|/kotlinClass|.R|kotlin/let|( = let@fun (it: R|KotlinClass|): R|KotlinClass| { ^ R|/it| } ) - R|/value|.R|/checkType|( = checkType@fun R|CheckTypeInv|.(): R|kotlin/Unit| { + R|/value|.R|/checkType|( = checkType@fun R|CheckTypeInv|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|/_|() } ) - lval lambda: R|() -> KotlinClass| = R|/kotlinClass|.R|kotlin/let| KotlinClass|>( = let@fun (it: R|KotlinClass|): R|() -> KotlinClass| { - ^ let@fun (): R|KotlinClass| { + lval lambda: R|() -> KotlinClass| = R|/kotlinClass|.R|kotlin/let| KotlinClass|>( = let@fun (it: R|KotlinClass|): R|() -> KotlinClass| { + ^ let@fun (): R|KotlinClass| { ^ R|/it| } } ) - R|/lambda|.R|/checkType| KotlinClass|>( = checkType@fun R|CheckTypeInv>|.(): R|kotlin/Unit| { + R|/lambda|.R|/checkType| KotlinClass|>( = checkType@fun R|CheckTypeInv>|.(): R|kotlin/Unit| { this@R|special/anonymous|.# KotlinClass?|>() } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/lambdaInLhsOfTypeOperatorCall.fir.txt b/compiler/fir/analysis-tests/testData/resolve/lambdaInLhsOfTypeOperatorCall.fir.txt index cdbe4d22f72..4dbbb788ded 100644 --- a/compiler/fir/analysis-tests/testData/resolve/lambdaInLhsOfTypeOperatorCall.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/lambdaInLhsOfTypeOperatorCall.fir.txt @@ -2,13 +2,13 @@ FILE: lambdaInLhsOfTypeOperatorCall.kt public final fun foo(b: R|B|): R|kotlin/Unit| { } public final fun test_1(b: R|B|): R|kotlin/Unit| { - R|/foo|((R|/b|.R|/myMap|( = myMap@fun (it: R|B|): R|kotlin/Int| { + R|/foo|((R|/b|.R|/myMap|( = myMap@fun (it: R|B|): R|kotlin/Int| { ^ R|/it|.R|SubstitutionOverride|.R|kotlin/String.length| } ) as R|B|)) } public final fun test_2(s: R|kotlin/String|): R|kotlin/Unit| { - lval func: R|B| = (fun (): R|kotlin/Int| { + lval func: R|B| = (fun (): R|kotlin/Int| { ^ R|/s|.R|kotlin/String.length| } as R|B|) diff --git a/compiler/fir/analysis-tests/testData/resolve/lambdaPropertyTypeInference.fir.txt b/compiler/fir/analysis-tests/testData/resolve/lambdaPropertyTypeInference.fir.txt index 80d838fddd7..242cf9e7534 100644 --- a/compiler/fir/analysis-tests/testData/resolve/lambdaPropertyTypeInference.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/lambdaPropertyTypeInference.fir.txt @@ -2,7 +2,7 @@ FILE: KotlinClass.kt public final fun case1(javaClass: R|JavaClass?|): R|kotlin/Unit| { lval validType: R|(JavaClass) -> kotlin/Boolean| = when () { !=(R|/javaClass|, Null(null)) -> { - fun (it: R|JavaClass|): R|kotlin/Boolean| { + fun (it: R|JavaClass|): R|kotlin/Boolean| { ^ ==(R|/it|, R|/javaClass|) } @@ -14,7 +14,7 @@ FILE: KotlinClass.kt lval invalidType: R|(JavaClass) -> kotlin/Boolean| = when () { !=(R|/javaClass|, Null(null)) -> { - fun (it: R|JavaClass|): R|kotlin/Boolean| { + fun (it: R|JavaClass|): R|kotlin/Boolean| { ^ ==(R|/it|, R|/javaClass|) } @@ -24,15 +24,15 @@ FILE: KotlinClass.kt } } - R|/validType|.R|/checkType| kotlin/Boolean|>( = checkType@fun R|CheckTypeInv>|.(): R|kotlin/Unit| { + R|/validType|.R|/checkType| kotlin/Boolean|>( = checkType@fun R|CheckTypeInv>|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|/_| kotlin/Boolean|>() } ) - R|/invalidType|.R|/checkType| kotlin/Boolean|>( = checkType@fun R|CheckTypeInv>|.(): R|kotlin/Unit| { + R|/invalidType|.R|/checkType| kotlin/Boolean|>( = checkType@fun R|CheckTypeInv>|.(): R|kotlin/Unit| { this@R|special/anonymous|.# kotlin/Boolean|>() } ) - R|/Case1.Case1|(R|/javaClass|).R|/Case1.x|.R|/checkType| kotlin/Boolean|>( = checkType@fun R|CheckTypeInv>|.(): R|kotlin/Unit| { + R|/Case1.Case1|(R|/javaClass|).R|/Case1.x|.R|/checkType| kotlin/Boolean|>( = checkType@fun R|CheckTypeInv>|.(): R|kotlin/Unit| { this@R|special/anonymous|.# kotlin/Boolean|>() } ) @@ -47,7 +47,7 @@ FILE: KotlinClass.kt public final val x: R|(KotlinClass) -> kotlin/Boolean| = when () { !=(this@R|/Case1|.R|/Case1.javaClass|, Null(null)) -> { - fun (it: R|KotlinClass|): R|kotlin/Boolean| { + fun (it: R|KotlinClass|): R|kotlin/Boolean| { ^ ==(R|/it|, this@R|/Case1|.R|/Case1.javaClass|) } @@ -70,7 +70,7 @@ FILE: KotlinClass.kt super() } - public final val FILTER: R|(JavaClass) -> kotlin/Boolean| = fun (it: R|JavaClass|): R|kotlin/Boolean| { + public final val FILTER: R|(JavaClass) -> kotlin/Boolean| = fun (it: R|JavaClass|): R|kotlin/Boolean| { ^ Boolean(true) } @@ -95,7 +95,7 @@ FILE: KotlinClass.kt public final fun case2(kotlinClass: R|KotlinClass?|): R|kotlin/Unit| { lval validType: R|(KotlinClass) -> kotlin/Boolean| = when () { !=(R|/kotlinClass|, Null(null)) -> { - fun (it: R|KotlinClass|): R|kotlin/Boolean| { + fun (it: R|KotlinClass|): R|kotlin/Boolean| { ^ ==(R|/it|, R|/kotlinClass|) } @@ -107,7 +107,7 @@ FILE: KotlinClass.kt lval invalidType: R|(KotlinClass) -> kotlin/Boolean| = when () { !=(R|/kotlinClass|, Null(null)) -> { - fun (it: R|KotlinClass|): R|kotlin/Boolean| { + fun (it: R|KotlinClass|): R|kotlin/Boolean| { ^ ==(R|/it|, R|/kotlinClass|) } @@ -117,15 +117,15 @@ FILE: KotlinClass.kt } } - R|/validType|.R|/checkType| kotlin/Boolean|>( = checkType@fun R|CheckTypeInv>|.(): R|kotlin/Unit| { + R|/validType|.R|/checkType| kotlin/Boolean|>( = checkType@fun R|CheckTypeInv>|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|/_| kotlin/Boolean|>() } ) - R|/invalidType|.R|/checkType| kotlin/Boolean|>( = checkType@fun R|CheckTypeInv>|.(): R|kotlin/Unit| { + R|/invalidType|.R|/checkType| kotlin/Boolean|>( = checkType@fun R|CheckTypeInv>|.(): R|kotlin/Unit| { this@R|special/anonymous|.# kotlin/Boolean|>() } ) - R|/Case2.Case2|(R|/kotlinClass|).R|/Case2.x|.R|/checkType| kotlin/Boolean|>( = checkType@fun R|CheckTypeInv>|.(): R|kotlin/Unit| { + R|/Case2.Case2|(R|/kotlinClass|).R|/Case2.x|.R|/checkType| kotlin/Boolean|>( = checkType@fun R|CheckTypeInv>|.(): R|kotlin/Unit| { this@R|special/anonymous|.# kotlin/Boolean|>() } ) @@ -140,7 +140,7 @@ FILE: KotlinClass.kt public final val x: R|(KotlinClass) -> kotlin/Boolean| = when () { !=(this@R|/Case2|.R|/Case2.kotlinClass|, Null(null)) -> { - fun (it: R|KotlinClass|): R|kotlin/Boolean| { + fun (it: R|KotlinClass|): R|kotlin/Boolean| { ^ ==(R|/it|, this@R|/Case2|.R|/Case2.kotlinClass|) } @@ -163,7 +163,7 @@ FILE: KotlinClass.kt super() } - public final val FILTER: R|(KotlinClass) -> kotlin/Boolean| = fun (it: R|KotlinClass|): R|kotlin/Boolean| { + public final val FILTER: R|(KotlinClass) -> kotlin/Boolean| = fun (it: R|KotlinClass|): R|kotlin/Boolean| { ^ Boolean(true) } diff --git a/compiler/fir/analysis-tests/testData/resolve/localObject.fir.txt b/compiler/fir/analysis-tests/testData/resolve/localObject.fir.txt index 798dfe4fb1b..ed7bd6a3ca2 100644 --- a/compiler/fir/analysis-tests/testData/resolve/localObject.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/localObject.fir.txt @@ -7,7 +7,7 @@ FILE: localObject.kt } public final fun tesLambda(x: R|kotlin/Int|): R|kotlin/Int| { - ^tesLambda R|/run|( = run@fun (): R|kotlin/Int| { + ^tesLambda R|/run|( = run@fun (): R|kotlin/Int| { lval obj: R|| = object : R|Foo| { private constructor(): R|| { super() @@ -64,7 +64,7 @@ FILE: localObject.kt ^ Int(1) } - public final val z: R|kotlin/Int| = this@R|/TestProperty|.R|kotlin/run|( = run@fun R|TestProperty|.(): R|kotlin/Int| { + public final val z: R|kotlin/Int| = this@R|/TestProperty|.R|kotlin/run|( = run@fun R|TestProperty|.(): R|kotlin/Int| { lval obj: R|| = object : R|Foo| { private constructor(): R|| { super() diff --git a/compiler/fir/analysis-tests/testData/resolve/overrides/simpleMostSpecific.fir.txt b/compiler/fir/analysis-tests/testData/resolve/overrides/simpleMostSpecific.fir.txt index 12ff3d185e2..aa01b228b40 100644 --- a/compiler/fir/analysis-tests/testData/resolve/overrides/simpleMostSpecific.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/overrides/simpleMostSpecific.fir.txt @@ -30,42 +30,42 @@ FILE: simpleMostSpecific.kt public abstract interface D3 : R|A|, R|C| { } public final fun main(d1: R|D1|, d2: R|D2|, d3: R|D3|): R|kotlin/Unit| { - R|/d1|.R|/B.x|.R|/checkType|( = checkType@fun R|CheckTypeInv|.(): R|kotlin/Unit| { + R|/d1|.R|/B.x|.R|/checkType|( = checkType@fun R|CheckTypeInv|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|/_|() } ) R|/d1|.R|/B.x| = String() - R|/d1|.R|/B.foo|().R|/checkType|( = checkType@fun R|CheckTypeInv|.(): R|kotlin/Unit| { + R|/d1|.R|/B.foo|().R|/checkType|( = checkType@fun R|CheckTypeInv|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|/_|() } ) - R|/d1|.R|/B.bar|(Int(1), String()).R|/checkType|( = checkType@fun R|CheckTypeInv|.(): R|kotlin/Unit| { + R|/d1|.R|/B.bar|(Int(1), String()).R|/checkType|( = checkType@fun R|CheckTypeInv|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|/_|() } ) - R|/d2|.R|/B.x|.R|/checkType|( = checkType@fun R|CheckTypeInv|.(): R|kotlin/Unit| { + R|/d2|.R|/B.x|.R|/checkType|( = checkType@fun R|CheckTypeInv|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|/_|() } ) R|/d2|.R|/B.x| = String() - R|/d2|.R|/B.foo|().R|/checkType|( = checkType@fun R|CheckTypeInv|.(): R|kotlin/Unit| { + R|/d2|.R|/B.foo|().R|/checkType|( = checkType@fun R|CheckTypeInv|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|/_|() } ) - R|/d2|.R|/B.bar|(Int(1), String()).R|/checkType|( = checkType@fun R|CheckTypeInv|.(): R|kotlin/Unit| { + R|/d2|.R|/B.bar|(Int(1), String()).R|/checkType|( = checkType@fun R|CheckTypeInv|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|/_|() } ) - R|/d3|.R|/C.x|.R|/checkType|( = checkType@fun R|CheckTypeInv|.(): R|kotlin/Unit| { + R|/d3|.R|/C.x|.R|/checkType|( = checkType@fun R|CheckTypeInv|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|/_|() } ) R|/d3|.R|/C.x| = String() - R|/d3|.R|/A.foo|().R|/checkType|( = checkType@fun R|CheckTypeInv|.(): R|kotlin/Unit| { + R|/d3|.R|/A.foo|().R|/checkType|( = checkType@fun R|CheckTypeInv|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|/_|() } ) - R|/d3|.R|/A.bar|(Int(1), String()).R|/checkType|( = checkType@fun R|CheckTypeInv|.(): R|kotlin/Unit| { + R|/d3|.R|/A.bar|(Int(1), String()).R|/checkType|( = checkType@fun R|CheckTypeInv|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|/_|() } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/problems/compilerPhase.fir.txt b/compiler/fir/analysis-tests/testData/resolve/problems/compilerPhase.fir.txt index e574055d543..db6b0d16653 100644 --- a/compiler/fir/analysis-tests/testData/resolve/problems/compilerPhase.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/problems/compilerPhase.fir.txt @@ -36,7 +36,7 @@ FILE: compilerPhase.kt this@R|/NamedCompilerPhase|.R|/NamedCompilerPhase.runAndProfile|(R|/phaseConfig|, R|/phaserState|, R|/context|, R|/input|) } else -> { - R|/phaserState|.R|/downlevel|(Int(1), = downlevel@fun (): R|Data| { + R|/phaserState|.R|/downlevel|(Int(1), = downlevel@fun (): R|Data| { ^ this@R|/NamedCompilerPhase|.R|/NamedCompilerPhase.lower|.R|SubstitutionOverride|(R|/phaseConfig|, R|/phaserState|, R|/context|, R|/input|) } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/problems/complexLambdaWithTypeVariableAsExpectedType.fir.txt b/compiler/fir/analysis-tests/testData/resolve/problems/complexLambdaWithTypeVariableAsExpectedType.fir.txt index 212f7b6226c..994959018d2 100644 --- a/compiler/fir/analysis-tests/testData/resolve/problems/complexLambdaWithTypeVariableAsExpectedType.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/problems/complexLambdaWithTypeVariableAsExpectedType.fir.txt @@ -6,10 +6,10 @@ FILE: complexLambdaWithTypeVariableAsExpectedType.kt ^select R|kotlin/TODO|() } public final fun test(): R|kotlin/Unit| { - R|/select| kotlin/Any|>(R|/id| kotlin/Int|>( = id@fun (it: R|kotlin/Int|): R|kotlin/Int| { + R|/select| kotlin/Any|>(R|/id| kotlin/Int|>( = id@fun (it: R|kotlin/Int|): R|kotlin/Int| { ^ R|/it|.R|kotlin/Int.inv|() } - ), R|/id| kotlin/Unit|>( = id@fun (it: R|kotlin/Int|): R|kotlin/Unit| { + ), R|/id| kotlin/Unit|>( = id@fun (it: R|kotlin/Int|): R|kotlin/Unit| { ^@id Unit } )) diff --git a/compiler/fir/analysis-tests/testData/resolve/problems/safeCallInvoke.fir.txt b/compiler/fir/analysis-tests/testData/resolve/problems/safeCallInvoke.fir.txt index 897c6475ab9..1b4855b338d 100644 --- a/compiler/fir/analysis-tests/testData/resolve/problems/safeCallInvoke.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/problems/safeCallInvoke.fir.txt @@ -13,7 +13,7 @@ FILE: safeCallInvoke.kt super() } - public final val bar: R|() -> kotlin/Unit| = fun (): R|kotlin/Unit| { + public final val bar: R|() -> kotlin/Unit| = fun (): R|kotlin/Unit| { ^ Unit } diff --git a/compiler/fir/analysis-tests/testData/resolve/rawTypeSam.fir.txt b/compiler/fir/analysis-tests/testData/resolve/rawTypeSam.fir.txt index 7b301b8d687..f9c5a8d2338 100644 --- a/compiler/fir/analysis-tests/testData/resolve/rawTypeSam.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/rawTypeSam.fir.txt @@ -1,6 +1,6 @@ FILE: main.kt public final fun foo(): R|kotlin/Unit| { - Q|RawType|.R|/RawType.bar|( = bar@fun (it: R|ft|): R|kotlin/Boolean| { + Q|RawType|.R|/RawType.bar|( = bar@fun (it: R|ft|): R|kotlin/Boolean| { ^ CMP(>, R|/it|.R|kotlin/CharSequence.length|.R|kotlin/Int.compareTo|(Int(0))) } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/samConstructors/genericSam.fir.txt b/compiler/fir/analysis-tests/testData/resolve/samConstructors/genericSam.fir.txt index b9f47d82d6d..bad91b82b2e 100644 --- a/compiler/fir/analysis-tests/testData/resolve/samConstructors/genericSam.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/samConstructors/genericSam.fir.txt @@ -1,14 +1,14 @@ FILE: main.kt public final fun main(): R|kotlin/Unit| { - R|/MyFunction||, R|ft|>( = MyFunction@fun (x: R|ft|): R|ft| { + R|/MyFunction||, R|ft|>( = MyFunction@fun (x: R|ft|): R|ft| { ^ R|/x|.R|kotlin/Int.toInt|().R|kotlin/Any.toString|() } ) - R|/MyFunction||, R|ft|>( = MyFunction@fun (x: R|kotlin/Int|): R|ft| { + R|/MyFunction||, R|ft|>( = MyFunction@fun (x: R|kotlin/Int|): R|ft| { ^ R|/x|.R|kotlin/Any.toString|() } ) - R|/MyFunction|( = MyFunction@fun (x: R|ft|): R|kotlin/Any?| { + R|/MyFunction|( = MyFunction@fun (x: R|ft|): R|kotlin/Any?| { ^ String() } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/samConstructors/genericSamInferenceFromExpectType.fir.txt b/compiler/fir/analysis-tests/testData/resolve/samConstructors/genericSamInferenceFromExpectType.fir.txt index 0ebe6b8ca81..d1533921669 100644 --- a/compiler/fir/analysis-tests/testData/resolve/samConstructors/genericSamInferenceFromExpectType.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/samConstructors/genericSamInferenceFromExpectType.fir.txt @@ -6,23 +6,23 @@ FILE: main.kt public final fun foo3(f: R|MyFunction|, x: R|X|): R|kotlin/Unit| { } public final fun main(): R|kotlin/Unit| { - R|/foo1|(R|/MyFunction|( = MyFunction@fun (x: R|ft|): R|ft| { + R|/foo1|(R|/MyFunction|( = MyFunction@fun (x: R|ft|): R|ft| { ^ R|/x|.R|kotlin/Int.toInt|().R|kotlin/Any.toString|() } )) - R|/foo2|(R|/MyFunction||>( = MyFunction@fun (x: R|ft|): R|ft| { + R|/foo2|(R|/MyFunction||>( = MyFunction@fun (x: R|ft|): R|ft| { ^ R|/x|.R|kotlin/Number.toInt|().R|kotlin/Any.toString|() } )) - #(R|/MyFunction||>( = MyFunction@fun (x: R|kotlin/Int|): R|ft| { + #(R|/MyFunction||>( = MyFunction@fun (x: R|kotlin/Int|): R|ft| { ^ R|/x|.R|kotlin/Any.toString|() } )) - R|/foo3||>(R|/MyFunction||>( = MyFunction@fun (x: R|ft|): R|ft| { + R|/foo3||>(R|/MyFunction||>( = MyFunction@fun (x: R|ft|): R|ft| { ^ R|/x|.R|kotlin/Int.plus|(Int(1)).R|kotlin/Any.toString|() } ), Int(1)) - R|/foo3||>(R|/MyFunction||>( = MyFunction@fun (x: R|kotlin/Number|): R|ft| { + R|/foo3||>(R|/MyFunction||>( = MyFunction@fun (x: R|kotlin/Number|): R|ft| { ^ R|/x|.R|kotlin/Number.toInt|().R|kotlin/Any.toString|() } ), Int(2)) diff --git a/compiler/fir/analysis-tests/testData/resolve/samConstructors/kotlinSam.fir.txt b/compiler/fir/analysis-tests/testData/resolve/samConstructors/kotlinSam.fir.txt index 31ce0ce6794..2ddf498bf83 100644 --- a/compiler/fir/analysis-tests/testData/resolve/samConstructors/kotlinSam.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/samConstructors/kotlinSam.fir.txt @@ -6,15 +6,15 @@ FILE: kotlinSam.kt public final fun foo(m: R|MyRunnable|): R|kotlin/Unit| { } public final fun main(): R|kotlin/Unit| { - R|/foo|(R|/MyRunnable|( = MyRunnable@fun (x: R|kotlin/Int|): R|kotlin/Boolean| { + R|/foo|(R|/MyRunnable|( = MyRunnable@fun (x: R|kotlin/Int|): R|kotlin/Boolean| { ^ CMP(>, R|/x|.R|kotlin/Int.compareTo|(Int(1))) } )) - R|/foo|(R|/MyRunnable|(MyRunnable@fun (it: R|kotlin/Int|): R|kotlin/Boolean| { + R|/foo|(R|/MyRunnable|(MyRunnable@fun (it: R|kotlin/Int|): R|kotlin/Boolean| { ^ CMP(>, R|/it|.R|kotlin/Int.compareTo|(Int(1))) } )) - lval x: R|(kotlin/Int) -> kotlin/Boolean| = fun (x: R|kotlin/Int|): R|kotlin/Boolean| { + lval x: R|(kotlin/Int) -> kotlin/Boolean| = fun (x: R|kotlin/Int|): R|kotlin/Boolean| { ^ CMP(>, R|/x|.R|kotlin/Int.compareTo|(Int(1))) } diff --git a/compiler/fir/analysis-tests/testData/resolve/samConstructors/realConstructorFunction.fir.txt b/compiler/fir/analysis-tests/testData/resolve/samConstructors/realConstructorFunction.fir.txt index ee199674e3b..4851fe2ded1 100644 --- a/compiler/fir/analysis-tests/testData/resolve/samConstructors/realConstructorFunction.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/samConstructors/realConstructorFunction.fir.txt @@ -5,15 +5,15 @@ FILE: main.kt ^MyRunnable Int(1) } public final fun main(): R|kotlin/Unit| { - #(R|/MyRunnable|( = MyRunnable@fun (x: R|kotlin/Int|): R|kotlin/Boolean| { + #(R|/MyRunnable|( = MyRunnable@fun (x: R|kotlin/Int|): R|kotlin/Boolean| { ^ CMP(>, R|/x|.R|kotlin/Int.compareTo|(Int(1))) } )) - #(R|/MyRunnable|(MyRunnable@fun (it: R|kotlin/Int|): R|kotlin/Boolean| { + #(R|/MyRunnable|(MyRunnable@fun (it: R|kotlin/Int|): R|kotlin/Boolean| { ^ CMP(>, R|/it|.R|kotlin/Int.compareTo|(Int(1))) } )) - lval x: R|(kotlin/Int) -> kotlin/Boolean| = fun (x: R|kotlin/Int|): R|kotlin/Boolean| { + lval x: R|(kotlin/Int) -> kotlin/Boolean| = fun (x: R|kotlin/Int|): R|kotlin/Boolean| { ^ CMP(>, R|/x|.R|kotlin/Int.compareTo|(Int(1))) } diff --git a/compiler/fir/analysis-tests/testData/resolve/samConstructors/runnable.fir.txt b/compiler/fir/analysis-tests/testData/resolve/samConstructors/runnable.fir.txt index 6115a67caa5..65340edb747 100644 --- a/compiler/fir/analysis-tests/testData/resolve/samConstructors/runnable.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/samConstructors/runnable.fir.txt @@ -2,7 +2,7 @@ FILE: runnable.kt public final fun foo(runnable: R|java/lang/Runnable|): R|kotlin/Unit| { } public final fun main(): R|kotlin/Unit| { - R|/foo|(R|java/lang/Runnable|( = Runnable@fun (): R|kotlin/Unit| { + R|/foo|(R|java/lang/Runnable|( = Runnable@fun (): R|kotlin/Unit| { ^@Runnable Unit } )) diff --git a/compiler/fir/analysis-tests/testData/resolve/samConstructors/simple.fir.txt b/compiler/fir/analysis-tests/testData/resolve/samConstructors/simple.fir.txt index 810740173ab..46c67f62240 100644 --- a/compiler/fir/analysis-tests/testData/resolve/samConstructors/simple.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/samConstructors/simple.fir.txt @@ -2,15 +2,15 @@ FILE: main.kt public final fun foo(m: R|MyRunnable|): R|kotlin/Unit| { } public final fun main(): R|kotlin/Unit| { - R|/foo|(R|/MyRunnable|( = MyRunnable@fun (x: R|kotlin/Int|): R|kotlin/Boolean| { + R|/foo|(R|/MyRunnable|( = MyRunnable@fun (x: R|kotlin/Int|): R|kotlin/Boolean| { ^ CMP(>, R|/x|.R|kotlin/Int.compareTo|(Int(1))) } )) - R|/foo|(R|/MyRunnable|(MyRunnable@fun (it: R|kotlin/Int|): R|kotlin/Boolean| { + R|/foo|(R|/MyRunnable|(MyRunnable@fun (it: R|kotlin/Int|): R|kotlin/Boolean| { ^ CMP(>, R|/it|.R|kotlin/Int.compareTo|(Int(1))) } )) - lval x: R|(kotlin/Int) -> kotlin/Boolean| = fun (x: R|kotlin/Int|): R|kotlin/Boolean| { + lval x: R|(kotlin/Int) -> kotlin/Boolean| = fun (x: R|kotlin/Int|): R|kotlin/Boolean| { ^ CMP(>, R|/x|.R|kotlin/Int.compareTo|(Int(1))) } diff --git a/compiler/fir/analysis-tests/testData/resolve/samConversions/genericSam.fir.txt b/compiler/fir/analysis-tests/testData/resolve/samConversions/genericSam.fir.txt index fe29b0afae9..d5eb56fb9e1 100644 --- a/compiler/fir/analysis-tests/testData/resolve/samConversions/genericSam.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/samConversions/genericSam.fir.txt @@ -1,22 +1,22 @@ FILE: main.kt public final fun main(): R|kotlin/Unit| { - Q|JavaUsage|.R|/JavaUsage.foo1|( = foo1@fun (x: R|ft|): R|ft| { + Q|JavaUsage|.R|/JavaUsage.foo1|( = foo1@fun (x: R|ft|): R|ft| { ^ R|/x|.R|kotlin/Int.toInt|().R|kotlin/Any.toString|() } ) - Q|JavaUsage|.R|/JavaUsage.foo2|( = foo2@fun (x: R|ft|): R|ft| { + Q|JavaUsage|.R|/JavaUsage.foo2|( = foo2@fun (x: R|ft|): R|ft| { ^ R|/x|.R|kotlin/Number.toInt|().R|kotlin/Any.toString|() } ) - Q|JavaUsage|.#( = foo2@fun (x: R|kotlin/Int|): R|ft| { + Q|JavaUsage|.#( = foo2@fun (x: R|kotlin/Int|): R|ft| { ^ R|/x|.R|kotlin/Any.toString|() } ) - Q|JavaUsage|.R|/JavaUsage.foo3||, R|ft|>(foo3@fun (x: R|ft|): R|ft| { + Q|JavaUsage|.R|/JavaUsage.foo3||, R|ft|>(foo3@fun (x: R|ft|): R|ft| { ^ R|/x|.R|kotlin/Int.plus|(Int(1)).R|kotlin/Any.toString|() } , Int(1)) - Q|JavaUsage|.R|/JavaUsage.foo3||, R|ft|>(foo3@fun (x: R|kotlin/Number|): R|ft| { + Q|JavaUsage|.R|/JavaUsage.foo3||, R|ft|>(foo3@fun (x: R|kotlin/Number|): R|ft| { ^ R|/x|.R|kotlin/Number.toInt|().R|kotlin/Any.toString|() } , Int(2)) diff --git a/compiler/fir/analysis-tests/testData/resolve/samConversions/kotlinSam.fir.txt b/compiler/fir/analysis-tests/testData/resolve/samConversions/kotlinSam.fir.txt index 04e92984f55..d822299f1f3 100644 --- a/compiler/fir/analysis-tests/testData/resolve/samConversions/kotlinSam.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/samConversions/kotlinSam.fir.txt @@ -29,26 +29,26 @@ FILE: kotlinSam.kt public final fun foo4(m: R|Derived|): R|kotlin/Unit| { } public final fun main(): R|kotlin/Unit| { - lval f: R|(kotlin/Int) -> kotlin/Boolean| = fun (t: R|kotlin/Int|): R|kotlin/Boolean| { + lval f: R|(kotlin/Int) -> kotlin/Boolean| = fun (t: R|kotlin/Int|): R|kotlin/Boolean| { ^ CMP(>, R|/t|.R|kotlin/Int.compareTo|(Int(1))) } - R|/foo1|( = foo1@fun (x: R|kotlin/Int|): R|kotlin/Boolean| { + R|/foo1|( = foo1@fun (x: R|kotlin/Int|): R|kotlin/Boolean| { ^ CMP(>, R|/x|.R|kotlin/Int.compareTo|(Int(1))) } ) R|/foo1|(R|/f|) - #( = foo2@fun (x: R|kotlin/Nothing|): R|kotlin/Nothing| { + #( = foo2@fun (x: R|kotlin/Nothing|): R|kotlin/Nothing| { ^ CMP(>, R|/x|.#(Int(1))) } ) #(R|/f|) - #( = foo3@fun (x: R|kotlin/Nothing|): R|kotlin/Nothing| { + #( = foo3@fun (x: R|kotlin/Nothing|): R|kotlin/Nothing| { ^ CMP(>, R|/x|.#(Int(1))) } ) #(R|/f|) - R|/foo4|( = foo4@fun (x: R|kotlin/Int|): R|kotlin/Boolean| { + R|/foo4|( = foo4@fun (x: R|kotlin/Int|): R|kotlin/Boolean| { ^ CMP(>, R|/x|.R|kotlin/Int.compareTo|(Int(1))) } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/samConversions/notSamBecauseOfSupertype.fir.txt b/compiler/fir/analysis-tests/testData/resolve/samConversions/notSamBecauseOfSupertype.fir.txt index 6bc71ae1046..51fe118c5ba 100644 --- a/compiler/fir/analysis-tests/testData/resolve/samConversions/notSamBecauseOfSupertype.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/samConversions/notSamBecauseOfSupertype.fir.txt @@ -2,15 +2,15 @@ FILE: main.kt public final fun foo(m: R|MyRunnable|): R|kotlin/Unit| { } public final fun main(): R|kotlin/Unit| { - Q|JavaUsage|.#( = foo@fun (x: R|kotlin/Nothing|): R|kotlin/Nothing| { + Q|JavaUsage|.#( = foo@fun (x: R|kotlin/Nothing|): R|kotlin/Nothing| { ^ CMP(>, R|/x|.#(Int(1))) } ) - Q|JavaUsage|.#(foo@fun (): R|kotlin/Boolean| { + Q|JavaUsage|.#(foo@fun (): R|kotlin/Boolean| { ^ CMP(>, #.#(Int(1))) } ) - lval x: R|(kotlin/Int) -> kotlin/Boolean| = fun (x: R|kotlin/Int|): R|kotlin/Boolean| { + lval x: R|(kotlin/Int) -> kotlin/Boolean| = fun (x: R|kotlin/Int|): R|kotlin/Boolean| { ^ CMP(>, R|/x|.R|kotlin/Int.compareTo|(Int(1))) } diff --git a/compiler/fir/analysis-tests/testData/resolve/samConversions/runnable.fir.txt b/compiler/fir/analysis-tests/testData/resolve/samConversions/runnable.fir.txt index f265cd70f90..8d72d6789c6 100644 --- a/compiler/fir/analysis-tests/testData/resolve/samConversions/runnable.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/samConversions/runnable.fir.txt @@ -1,10 +1,10 @@ FILE: main.kt public final fun main(): R|kotlin/Unit| { - Q|JavaClass|.R|/JavaClass.foo|( = foo@fun (): R|kotlin/Unit| { + Q|JavaClass|.R|/JavaClass.foo|( = foo@fun (): R|kotlin/Unit| { String() } ) - R|/JavaClass.JavaClass|().R|/JavaClass.bar|( = bar@fun (): R|kotlin/Unit| { + R|/JavaClass.JavaClass|().R|/JavaClass.bar|( = bar@fun (): R|kotlin/Unit| { String() } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/samConversions/samConversionInConstructorCall.fir.txt b/compiler/fir/analysis-tests/testData/resolve/samConversions/samConversionInConstructorCall.fir.txt index 04104457da1..54a4042beba 100644 --- a/compiler/fir/analysis-tests/testData/resolve/samConversions/samConversionInConstructorCall.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/samConversions/samConversionInConstructorCall.fir.txt @@ -1,6 +1,6 @@ FILE: main.kt public final fun test(): R|kotlin/Unit| { - R|/Foo.Foo|( = Foo@fun (it: R|kotlin/Boolean|): R|kotlin/Boolean| { + R|/Foo.Foo|( = Foo@fun (it: R|kotlin/Boolean|): R|kotlin/Boolean| { ^ R|/it| } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/samConversions/samSupertype.fir.txt b/compiler/fir/analysis-tests/testData/resolve/samConversions/samSupertype.fir.txt index e4fd224375b..9d4b50450e8 100644 --- a/compiler/fir/analysis-tests/testData/resolve/samConversions/samSupertype.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/samConversions/samSupertype.fir.txt @@ -2,15 +2,15 @@ FILE: main.kt public final fun foo(m: R|MyRunnable|): R|kotlin/Unit| { } public final fun main(): R|kotlin/Unit| { - Q|JavaUsage|.R|/JavaUsage.foo|( = foo@fun (x: R|kotlin/Int|): R|kotlin/Boolean| { + Q|JavaUsage|.R|/JavaUsage.foo|( = foo@fun (x: R|kotlin/Int|): R|kotlin/Boolean| { ^ CMP(>, R|/x|.R|kotlin/Int.compareTo|(Int(1))) } ) - Q|JavaUsage|.R|/JavaUsage.foo|(foo@fun (it: R|kotlin/Int|): R|kotlin/Boolean| { + Q|JavaUsage|.R|/JavaUsage.foo|(foo@fun (it: R|kotlin/Int|): R|kotlin/Boolean| { ^ CMP(>, R|/it|.R|kotlin/Int.compareTo|(Int(1))) } ) - lval x: R|(kotlin/Int) -> kotlin/Boolean| = fun (x: R|kotlin/Int|): R|kotlin/Boolean| { + lval x: R|(kotlin/Int) -> kotlin/Boolean| = fun (x: R|kotlin/Int|): R|kotlin/Boolean| { ^ CMP(>, R|/x|.R|kotlin/Int.compareTo|(Int(1))) } diff --git a/compiler/fir/analysis-tests/testData/resolve/samConversions/samSupertypeWithOverride.fir.txt b/compiler/fir/analysis-tests/testData/resolve/samConversions/samSupertypeWithOverride.fir.txt index ff262254ccd..fdb8b14c28e 100644 --- a/compiler/fir/analysis-tests/testData/resolve/samConversions/samSupertypeWithOverride.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/samConversions/samSupertypeWithOverride.fir.txt @@ -2,15 +2,15 @@ FILE: main.kt public final fun foo(m: R|MyRunnable|): R|kotlin/Unit| { } public final fun main(): R|kotlin/Unit| { - Q|JavaUsage|.R|/JavaUsage.foo|( = foo@fun (x: R|kotlin/Int|): R|ft| { + Q|JavaUsage|.R|/JavaUsage.foo|( = foo@fun (x: R|kotlin/Int|): R|ft| { ^ CMP(>, R|/x|.R|kotlin/Int.compareTo|(Int(1))) } ) - Q|JavaUsage|.R|/JavaUsage.foo|(foo@fun (it: R|kotlin/Int|): R|ft| { + Q|JavaUsage|.R|/JavaUsage.foo|(foo@fun (it: R|kotlin/Int|): R|ft| { ^ CMP(>, R|/it|.R|kotlin/Int.compareTo|(Int(1))) } ) - lval x: R|(kotlin/Int) -> kotlin/Boolean| = fun (x: R|kotlin/Int|): R|kotlin/Boolean| { + lval x: R|(kotlin/Int) -> kotlin/Boolean| = fun (x: R|kotlin/Int|): R|kotlin/Boolean| { ^ CMP(>, R|/x|.R|kotlin/Int.compareTo|(Int(1))) } diff --git a/compiler/fir/analysis-tests/testData/resolve/samConversions/samWithEquals.fir.txt b/compiler/fir/analysis-tests/testData/resolve/samConversions/samWithEquals.fir.txt index 39eaf95d2a5..1469cbc824a 100644 --- a/compiler/fir/analysis-tests/testData/resolve/samConversions/samWithEquals.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/samConversions/samWithEquals.fir.txt @@ -5,7 +5,7 @@ FILE: main.kt } public final fun main(): R|kotlin/Unit| { - Q|OverridingUtil|.R|/OverridingUtil.createWithEqualityAxioms|( = l1@fun (c1: R|ft|, c2: R|ft|): R|kotlin/Boolean| { + Q|OverridingUtil|.R|/OverridingUtil.createWithEqualityAxioms|( = l1@fun (c1: R|ft|, c2: R|ft|): R|kotlin/Boolean| { when () { ==(R|/c1|.R|/TypeConstructor.x|, R|/c2|.R|/TypeConstructor.x|) -> { ^@l1 Boolean(true) diff --git a/compiler/fir/analysis-tests/testData/resolve/samConversions/simple.fir.txt b/compiler/fir/analysis-tests/testData/resolve/samConversions/simple.fir.txt index e4fd224375b..9d4b50450e8 100644 --- a/compiler/fir/analysis-tests/testData/resolve/samConversions/simple.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/samConversions/simple.fir.txt @@ -2,15 +2,15 @@ FILE: main.kt public final fun foo(m: R|MyRunnable|): R|kotlin/Unit| { } public final fun main(): R|kotlin/Unit| { - Q|JavaUsage|.R|/JavaUsage.foo|( = foo@fun (x: R|kotlin/Int|): R|kotlin/Boolean| { + Q|JavaUsage|.R|/JavaUsage.foo|( = foo@fun (x: R|kotlin/Int|): R|kotlin/Boolean| { ^ CMP(>, R|/x|.R|kotlin/Int.compareTo|(Int(1))) } ) - Q|JavaUsage|.R|/JavaUsage.foo|(foo@fun (it: R|kotlin/Int|): R|kotlin/Boolean| { + Q|JavaUsage|.R|/JavaUsage.foo|(foo@fun (it: R|kotlin/Int|): R|kotlin/Boolean| { ^ CMP(>, R|/it|.R|kotlin/Int.compareTo|(Int(1))) } ) - lval x: R|(kotlin/Int) -> kotlin/Boolean| = fun (x: R|kotlin/Int|): R|kotlin/Boolean| { + lval x: R|(kotlin/Int) -> kotlin/Boolean| = fun (x: R|kotlin/Int|): R|kotlin/Boolean| { ^ CMP(>, R|/x|.R|kotlin/Int.compareTo|(Int(1))) } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/returns.fir.txt b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/returns.fir.txt index aae0e4a5854..c3686da2bda 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/returns.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/returns.fir.txt @@ -75,7 +75,7 @@ FILE: returns.kt public final fun test_4(a: R|kotlin/Any?|): R|kotlin/Unit| { lval s: R|kotlin/String?| = (R|/a| as? R|kotlin/String|) lval length: R|kotlin/Int| = R|/s|?.{ $subj$.R|/ext| } ?: ^test_4 Unit - R|/runHigherOrder|( = runHigherOrder@fun (): R|kotlin/Int| { + R|/runHigherOrder|( = runHigherOrder@fun (): R|kotlin/Int| { ^ R|/s|.R|kotlin/String.length| } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/kt10240.fir.txt b/compiler/fir/analysis-tests/testData/resolve/smartcasts/kt10240.fir.txt index 82fa888bc7c..4122e38f6c8 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/kt10240.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/kt10240.fir.txt @@ -21,7 +21,7 @@ FILE: kt10240.kt public final fun println(arg: R|kotlin/Int|): R|kotlin/Unit| { } public final fun d(): R|kotlin/Unit| { - R|/myRun|( = myRun@fun (): R|kotlin/Unit| { + R|/myRun|( = myRun@fun (): R|kotlin/Unit| { lvar koko: R|kotlin/String?| = String(Alpha) while(!=(R|/koko|, Null(null))) { R|/println|(R|/koko|.R|kotlin/String.length|) @@ -30,7 +30,7 @@ FILE: kt10240.kt } ) - R|/myRun|( = myRun@fun (): R|kotlin/Unit| { + R|/myRun|( = myRun@fun (): R|kotlin/Unit| { lvar koko: R|kotlin/String?| = String(Omega) while(!=(R|/koko|, Null(null))) { R|/println|(R|/koko|.R|kotlin/String.length|) diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/inPlaceLambdas.fir.txt b/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/inPlaceLambdas.fir.txt index 16f58ddcc85..6efdacbcf0d 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/inPlaceLambdas.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/inPlaceLambdas.fir.txt @@ -10,7 +10,7 @@ FILE: inPlaceLambdas.kt public final fun test_1(x: R|kotlin/Any?|): R|kotlin/Unit| { when () { (R|/x| is R|A|) -> { - R|kotlin/run|( = run@fun (): R|kotlin/Unit| { + R|kotlin/run|( = run@fun (): R|kotlin/Unit| { R|/x|.R|/A.foo|() } ) @@ -19,7 +19,7 @@ FILE: inPlaceLambdas.kt } public final fun test_2(x: R|kotlin/Any?|): R|kotlin/Unit| { - R|kotlin/run|( = run@fun (): R|B| { + R|kotlin/run|( = run@fun (): R|B| { ^ (R|/x| as R|B|) } ) @@ -28,7 +28,7 @@ FILE: inPlaceLambdas.kt public final fun test_3(x: R|kotlin/Any?|): R|kotlin/Unit| { when () { (R|/x| is R|A|) -> { - R|kotlin/run|( = run@fun (): R|B| { + R|kotlin/run|( = run@fun (): R|B| { R|/x|.R|/A.foo|() ^ (R|/x| as R|B|) } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/lambdaInWhenBranch.fir.txt b/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/lambdaInWhenBranch.fir.txt index a589aac53c9..13b340a6851 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/lambdaInWhenBranch.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/lambdaInWhenBranch.fir.txt @@ -29,7 +29,7 @@ FILE: lambdaInWhenBranch.kt private final fun foo(p: R|Sealed|): R|kotlin/Unit| { when (R|/p|) { ($subj$ is R|SubClass1|) -> { - String().R|kotlin/let|( = let@fun (it: R|kotlin/String|): R|kotlin/String| { + String().R|kotlin/let|( = let@fun (it: R|kotlin/String|): R|kotlin/String| { ^ R|/it| } ) diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/implicitReceivers.fir.txt b/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/implicitReceivers.fir.txt index bafa98258a4..9898cb3d074 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/implicitReceivers.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/implicitReceivers.fir.txt @@ -50,9 +50,9 @@ FILE: implicitReceivers.kt #() } public final fun test_3(a: R|kotlin/Any|, b: R|kotlin/Any|, c: R|kotlin/Any|): R|kotlin/Unit| { - R|kotlin/with|(R|/a|, = wa@fun R|kotlin/Any|.(): R|kotlin/Unit| { - ^ 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| { + R|kotlin/with|(R|/a|, = wa@fun R|kotlin/Any|.(): R|kotlin/Unit| { + ^ 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|special/anonymous|.R|/A.foo|() diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/safeCalls.fir.txt b/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/safeCalls.fir.txt index b45cf047799..93bfacb7409 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/safeCalls.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/safeCalls.fir.txt @@ -20,7 +20,7 @@ FILE: safeCalls.kt (R|/x| as? R|A|)?.{ $subj$.R|/A.bar|(R|/x|) } } public final fun test_3(x: R|kotlin/Any|): R|kotlin/Unit| { - (R|/x| as? R|A|)?.{ $subj$.R|/A.bar|(R|/x|) }?.{ $subj$.R|/foo|(R|/x|.R|/A.bool|()) }?.{ $subj$.R|/let|( = let@fun (): R|kotlin/Unit| { + (R|/x| as? R|A|)?.{ $subj$.R|/A.bar|(R|/x|) }?.{ $subj$.R|/foo|(R|/x|.R|/A.bool|()) }?.{ $subj$.R|/let|( = let@fun (): R|kotlin/Unit| { R|/x|.R|/A.bool|() } ) } @@ -33,7 +33,7 @@ FILE: safeCalls.kt public final fun R|kotlin/Any?|.boo(b: R|kotlin/Boolean|): R|kotlin/Unit| { } public final fun test_5(x: R|A?|): R|kotlin/Unit| { - R|/x|?.{ $subj$.R|kotlin/let|( = let@fun (it: R|A|): R|kotlin/Nothing| { + R|/x|?.{ $subj$.R|kotlin/let|( = let@fun (it: R|A|): R|kotlin/Nothing| { ^test_5 Unit } ) }?.{ $subj$.R|/boo|(R|/x|.R|/A.bool|()) } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastToNothing.fir.txt b/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastToNothing.fir.txt index bc8f2ab08ec..23d5348e8f7 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastToNothing.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastToNothing.fir.txt @@ -42,7 +42,7 @@ FILE: smartcastToNothing.kt } - R|/s|?.{ $subj$.R|kotlin/let|( = let@fun (it: R|A|): R|kotlin/Int| { + R|/s|?.{ $subj$.R|kotlin/let|( = let@fun (it: R|A|): R|kotlin/Int| { ^ R|/it|.R|/A.a| } ) } diff --git a/compiler/fir/analysis-tests/testData/resolve/typesInLocalFunctions.fir.txt b/compiler/fir/analysis-tests/testData/resolve/typesInLocalFunctions.fir.txt index 52dba0bbc73..247b38cafa2 100644 --- a/compiler/fir/analysis-tests/testData/resolve/typesInLocalFunctions.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/typesInLocalFunctions.fir.txt @@ -9,7 +9,7 @@ FILE: typesInLocalFunctions.kt lval s: R|Some| = R|/Some.Some|() when () { Boolean(true) -> { - ^foo fun (): R|kotlin/Boolean| { + ^foo fun (): R|kotlin/Boolean| { ^ when () { (R|/s| is R|Some|) -> { Boolean(true) @@ -23,7 +23,7 @@ FILE: typesInLocalFunctions.kt } else -> { - ^foo fun (): R|kotlin/Boolean| { + ^foo fun (): R|kotlin/Boolean| { ^ Boolean(true) } diff --git a/compiler/fir/analysis-tests/testData/resolve/whenAsReceiver.fir.txt b/compiler/fir/analysis-tests/testData/resolve/whenAsReceiver.fir.txt index 7071b7cf649..a357efa47cc 100644 --- a/compiler/fir/analysis-tests/testData/resolve/whenAsReceiver.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/whenAsReceiver.fir.txt @@ -11,7 +11,7 @@ FILE: whenAsReceiver.kt Null(null) } } - ?.{ $subj$.R|/also|( = also@fun (): R|kotlin/Int| { + ?.{ $subj$.R|/also|( = also@fun (): R|kotlin/Int| { ^ Int(1) } ) } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/addAllOnJavaCollection.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/addAllOnJavaCollection.fir.txt index 898b85fe9ca..ec5175e4981 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/addAllOnJavaCollection.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/addAllOnJavaCollection.fir.txt @@ -1,7 +1,7 @@ FILE: addAllOnJavaCollection.kt public final fun foo(): R|kotlin/Unit| { lval y: R|kotlin/collections/List| = R|kotlin/collections/listOf|(vararg(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| { + 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|special/anonymous|.R|SubstitutionOverride|(R|/y|) } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/chooseCallableReferenceDependingOnInferredReceiver.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/chooseCallableReferenceDependingOnInferredReceiver.fir.txt index 8640319f75c..7a9ae0d54e8 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/chooseCallableReferenceDependingOnInferredReceiver.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/chooseCallableReferenceDependingOnInferredReceiver.fir.txt @@ -30,10 +30,10 @@ FILE: chooseCallableReferenceDependingOnInferredReceiver.kt ^bar R|kotlin/TODO|() } public final fun test(): R|kotlin/Unit| { - R|/myWith|(R|/A.A|(), = myWith@fun R|A|.(): R|kotlin/Nothing| { + R|/myWith|(R|/A.A|(), = myWith@fun R|A|.(): R|kotlin/Nothing| { lval t1: R|A| = R|/bar|(::R|/A.foo|) lval t2: R|A| = R|/bar|(::R|/A.baz|) - ^ R|/myWith|(R|/B.B|(), = myWith@fun R|B|.(): R|kotlin/Nothing| { + ^ R|/myWith|(R|/B.B|(), = myWith@fun R|B|.(): R|kotlin/Nothing| { lval a: R|A| = R|/bar|(::R|/A.foo|) lval b: R|B| = R|/bar|(::R|/B.foo|) lval t3: R|B| = R|/bar|(::R|/B.baz|) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/genericInReceiver.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/genericInReceiver.fir.txt index e4d5c03b6d7..93a17893096 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/genericInReceiver.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/genericInReceiver.fir.txt @@ -3,7 +3,7 @@ FILE: genericInReceiver.kt lval pair: R|kotlin/Pair| = R|/s|.R|kotlin/let||>(R|/a|::R|kotlin/to|) } public final fun test_2(a: R|kotlin/String|, s: R|kotlin/String|): R|kotlin/Unit| { - lval pair: R|kotlin/Pair| = R|/s|.R|kotlin/let||>( = let@fun (it: R|kotlin/String|): R|kotlin/Pair| { + lval pair: R|kotlin/Pair| = R|/s|.R|kotlin/let||>( = let@fun (it: R|kotlin/String|): R|kotlin/Pair| { ^ R|/a|.R|kotlin/to|(R|/it|) } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/complexPostponedCfg.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/complexPostponedCfg.fir.txt index 567a734e67b..88c0aac7a71 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/complexPostponedCfg.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/complexPostponedCfg.fir.txt @@ -4,10 +4,10 @@ FILE: complexPostponedCfg.kt public abstract interface FirFunctionCall : R|FirBase| { } public final fun foo(statements: R|kotlin/collections/List|, arguments: R|kotlin/collections/List|, explicitReceiver: R|FirBase|): R|kotlin/collections/List| { - lval firstCalls: R|kotlin/collections/List| = R|kotlin/with||>((R|/statements|.R|kotlin/collections/last|() as R|FirFunctionCall|), = setCall@fun R|FirFunctionCall|.(): R|kotlin/collections/List| { - ^ R|kotlin/collections/buildList|( = buildList@fun R|kotlin/collections/MutableList|.(): R|kotlin/Unit| { + lval firstCalls: R|kotlin/collections/List| = R|kotlin/with||>((R|/statements|.R|kotlin/collections/last|() as R|FirFunctionCall|), = setCall@fun R|FirFunctionCall|.(): R|kotlin/collections/List| { + ^ R|kotlin/collections/buildList|( = buildList@fun R|kotlin/collections/MutableList|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|SubstitutionOverride|(this@R|special/anonymous|) - R|kotlin/with|((R|/arguments|.R|kotlin/collections/last|() as R|FirFunctionCall|), = plusCall@fun R|FirFunctionCall|.(): R|kotlin/Unit| { + R|kotlin/with|((R|/arguments|.R|kotlin/collections/last|() as R|FirFunctionCall|), = plusCall@fun R|FirFunctionCall|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|SubstitutionOverride|(this@R|special/anonymous|) this@R|special/anonymous|.R|SubstitutionOverride|((R|/explicitReceiver| as R|FirFunctionCall|)) } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/components.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/components.fir.txt index d503171be06..08fb6aae8b6 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/components.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/components.fir.txt @@ -28,7 +28,7 @@ FILE: components.kt lval : R|D| = R|/list|.R|kotlin/collections/first|() lval x: R|kotlin/Int| = R|/|.R|/D.component1|() lval y: R|kotlin/String| = R|/|.R|/D.component2|() - R|/list|.R|kotlin/collections/forEach|( = forEach@fun (: R|D|): R|kotlin/Unit| { + R|/list|.R|kotlin/collections/forEach|( = forEach@fun (: R|D|): R|kotlin/Unit| { lval x: R|kotlin/Int| = R|/|.R|/D.component1|() lval y: R|kotlin/String| = R|/|.R|/D.component2|() R|kotlin/io/println|(R|/x|) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/callsInPlace.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/callsInPlace.fir.txt index cf9196e0f33..a7774ef7f27 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/callsInPlace.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/callsInPlace.fir.txt @@ -1,33 +1,33 @@ FILE: callsInPlace.kt public final fun test(): R|kotlin/Unit| { lval x: R|kotlin/Int| - R|kotlin/run|( = run@fun (): R|kotlin/Unit| { + R|kotlin/run|( = run@fun (): R|kotlin/Unit| { R|/x| = Int(1) } ) R|/x|.R|kotlin/Int.inc|() } public final fun test_2(): R|kotlin/Unit| { - R|kotlin/repeat|(Int(10), = repeat@fun (it: R|kotlin/Int|): R|kotlin/Unit| { + R|kotlin/repeat|(Int(10), = repeat@fun (it: R|kotlin/Int|): R|kotlin/Unit| { String(test_2) } ) } public final fun test_3(): R|kotlin/Unit| { - R|kotlin/repeat|(action = repeat@fun (it: R|kotlin/Int|): R|kotlin/Unit| { + R|kotlin/repeat|(action = repeat@fun (it: R|kotlin/Int|): R|kotlin/Unit| { String(test_3) } , times = Int(10)) } public final fun test_4(): R|kotlin/Unit| { - Int(1).R|kotlin/takeUnless|( = takeUnless@fun (it: R|kotlin/Int|): R|kotlin/Boolean| { + Int(1).R|kotlin/takeUnless|( = takeUnless@fun (it: R|kotlin/Int|): R|kotlin/Boolean| { String(test_4) ^ CMP(>, R|/it|.R|kotlin/Int.compareTo|(Int(0))) } ) } public final fun test_5(): R|kotlin/Unit| { - Int(1).R|kotlin/takeUnless|(predicate = takeUnless@fun (it: R|kotlin/Int|): R|kotlin/Boolean| { + Int(1).R|kotlin/takeUnless|(predicate = takeUnless@fun (it: R|kotlin/Int|): R|kotlin/Boolean| { String(test_5) ^ CMP(>, R|/it|.R|kotlin/Int.compareTo|(Int(0))) } @@ -38,19 +38,19 @@ FILE: callsInPlace.kt R|/block2|.R|SubstitutionOverride|() } public final fun test_6(): R|kotlin/Unit| { - R|/myRun|(myRun@fun (): R|kotlin/Unit| { + R|/myRun|(myRun@fun (): R|kotlin/Unit| { String(test_6_1) } - , = myRun@fun (): R|kotlin/Unit| { + , = myRun@fun (): R|kotlin/Unit| { String(test_6_2) } ) } public final fun test_7(): R|kotlin/Unit| { - R|/myRun|(block2 = myRun@fun (): R|kotlin/Unit| { + R|/myRun|(block2 = myRun@fun (): R|kotlin/Unit| { String(test_7_2) } - , block1 = myRun@fun (): R|kotlin/Unit| { + , block1 = myRun@fun (): R|kotlin/Unit| { String(test_7_1) } ) @@ -59,7 +59,7 @@ FILE: callsInPlace.kt R|/block|.R|SubstitutionOverride|() } public final fun test_8(): R|kotlin/Unit| { - R|/myDummyRun|( = myDummyRun@fun (): R|kotlin/Unit| { + R|/myDummyRun|( = myDummyRun@fun (): R|kotlin/Unit| { String(test_8) } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atLeastOnce.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atLeastOnce.fir.txt index dccac9a8706..5d3524b8691 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atLeastOnce.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atLeastOnce.fir.txt @@ -19,7 +19,7 @@ FILE: atLeastOnce.kt } public final fun test_1(): R|kotlin/Unit| { lval x: R|kotlin/Int| - R|/inlineRun|( = inlineRun@fun (): R|kotlin/Unit| { + R|/inlineRun|( = inlineRun@fun (): R|kotlin/Unit| { R|/x| = Int(1) } ) @@ -27,7 +27,7 @@ FILE: atLeastOnce.kt } public final fun test_2(): R|kotlin/Unit| { lval x: R|kotlin/Int| - R|/myRun|( = myRun@fun (): R|kotlin/Unit| { + R|/myRun|( = myRun@fun (): R|kotlin/Unit| { R|/x| = Int(1) } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atMostOnce.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atMostOnce.fir.txt index b3ce1c12487..a6da9471eef 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atMostOnce.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atMostOnce.fir.txt @@ -19,7 +19,7 @@ FILE: atMostOnce.kt } public final fun test_1(): R|kotlin/Unit| { lval x: R|kotlin/Int| - R|/inlineRun|( = inlineRun@fun (): R|kotlin/Unit| { + R|/inlineRun|( = inlineRun@fun (): R|kotlin/Unit| { R|/x| = Int(1) } ) @@ -27,7 +27,7 @@ FILE: atMostOnce.kt } public final fun test_2(): R|kotlin/Unit| { lval x: R|kotlin/Int| - R|/myRun|( = myRun@fun (): R|kotlin/Unit| { + R|/myRun|( = myRun@fun (): R|kotlin/Unit| { R|/x| = Int(1) } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/exactlyOnce.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/exactlyOnce.fir.txt index 12063c44928..a8c412a251f 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/exactlyOnce.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/exactlyOnce.fir.txt @@ -19,7 +19,7 @@ FILE: exactlyOnce.kt } public final fun test_1(): R|kotlin/Unit| { lval x: R|kotlin/Int| - R|/inlineRun|( = inlineRun@fun (): R|kotlin/Unit| { + R|/inlineRun|( = inlineRun@fun (): R|kotlin/Unit| { R|/x| = Int(1) } ) @@ -27,7 +27,7 @@ FILE: exactlyOnce.kt } public final fun test_2(): R|kotlin/Unit| { lval x: R|kotlin/Int| - R|/myRun|( = myRun@fun (): R|kotlin/Unit| { + R|/myRun|( = myRun@fun (): R|kotlin/Unit| { R|/x| = Int(1) } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/inPlaceLambda.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/inPlaceLambda.fir.txt index affbd7d7270..1373e7b34d5 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/inPlaceLambda.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/inPlaceLambda.fir.txt @@ -21,7 +21,7 @@ FILE: inPlaceLambda.kt { [StubStatement] R|/x|.R|SubstitutionOverride|() - R|/bar|( = bar@fun (): R|kotlin/Unit| { + R|/bar|( = bar@fun (): R|kotlin/Unit| { R|/x|.R|SubstitutionOverride|() } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/unknown.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/unknown.fir.txt index 02f8d7ffaee..0c68b9a376c 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/unknown.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/unknown.fir.txt @@ -19,7 +19,7 @@ FILE: unknown.kt } public final fun test_1(): R|kotlin/Unit| { lval x: R|kotlin/Int| - R|/inlineRun|( = inlineRun@fun (): R|kotlin/Unit| { + R|/inlineRun|( = inlineRun@fun (): R|kotlin/Unit| { R|/x| = Int(1) } ) @@ -27,7 +27,7 @@ FILE: unknown.kt } public final fun test_2(): R|kotlin/Unit| { lval x: R|kotlin/Int| - R|/myRun|( = myRun@fun (): R|kotlin/Unit| { + R|/myRun|( = myRun@fun (): R|kotlin/Unit| { R|/x| = Int(1) } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/returnsImplies/receivers.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/returnsImplies/receivers.fir.txt index 6a817172d84..6a2536102b0 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/returnsImplies/receivers.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/returnsImplies/receivers.fir.txt @@ -23,20 +23,20 @@ FILE: receivers.kt } public final fun test_2(x: R|A?|): R|kotlin/Unit| { R|/x|.R|/myRequireNotNull|() - R|kotlin/with|(R|/x|, = with@fun R|A|.(): R|kotlin/Unit| { + R|kotlin/with|(R|/x|, = with@fun R|A|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|/foo|() } ) } public final fun test_3(x: R|A?|): R|kotlin/Unit| { - R|kotlin/with|(R|/x|, = with@fun R|A?|.(): R|kotlin/Unit| { + R|kotlin/with|(R|/x|, = with@fun R|A?|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|/myRequireNotNull|() } ) R|/x|.#() } public final fun test_4(x: R|A?|): R|kotlin/Unit| { - R|kotlin/with|(R|/x|, = with@fun R|A?|.(): R|kotlin/Unit| { + R|kotlin/with|(R|/x|, = with@fun R|A?|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|/myRequireNotNull|() this@R|special/anonymous|.R|/foo|() } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/anonymousInDelegate.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/anonymousInDelegate.fir.txt index e5f6943d152..1d5def93c8e 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/anonymousInDelegate.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/anonymousInDelegate.fir.txt @@ -3,7 +3,7 @@ FILE: anonymousInDelegate.kt public abstract fun bar(): R|kotlin/Int| } - public final val x: R|kotlin/Int|by R|kotlin/lazy|( = lazy@fun (): R|kotlin/Int| { + public final val x: R|kotlin/Int|by R|kotlin/lazy|( = lazy@fun (): R|kotlin/Int| { lval foo: R|| = object : R|Foo| { private constructor(): R|| { super() diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateTypeMismatch.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateTypeMismatch.fir.txt index 9d78be1a73a..c5ad7b1e290 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateTypeMismatch.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateTypeMismatch.fir.txt @@ -19,7 +19,7 @@ FILE: delegateTypeMismatch.kt public get(): R|kotlin/Boolean| private final fun property(initialValue: R|T|): R|kotlin/properties/ReadWriteProperty| { - ^property Q|kotlin/properties/Delegates|.R|kotlin/properties/Delegates.vetoable|(R|/initialValue|, = vetoable@fun (_: R|@R|kotlin/ParameterName|(name = String(property)) kotlin/reflect/KProperty<*>|, _: R|T|, _: R|T|): R|kotlin/Boolean| { + ^property Q|kotlin/properties/Delegates|.R|kotlin/properties/Delegates.vetoable|(R|/initialValue|, = vetoable@fun (_: R|@R|kotlin/ParameterName|(name = String(property)) kotlin/reflect/KProperty<*>|, _: R|T|, _: R|T|): R|kotlin/Boolean| { ^ when () { this@R|/A|.R|/A.isLocked| -> { throw R|java/lang/IllegalStateException.IllegalStateException|(String(Cannot modify readonly DescriptorRendererOptions)) @@ -41,7 +41,7 @@ FILE: delegateTypeMismatch.kt this@R|/A|.D|/A.classifierNamePolicy|.R|SubstitutionOverride|(this@R|/A|, ::R|/A.classifierNamePolicy|, R|/classifierNamePolicy|) } - public final var typeNormalizer: R|(KotlinType) -> KotlinType|by this@R|/A|.R|/A.property| KotlinType|>(property@fun (it: R|KotlinType|): R|KotlinType| { + public final var typeNormalizer: R|(KotlinType) -> KotlinType|by this@R|/A|.R|/A.property| KotlinType|>(property@fun (it: R|KotlinType|): R|KotlinType| { ^ R|/it| } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.fir.txt index 8b12a49fb46..332b46cb648 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.fir.txt @@ -22,7 +22,7 @@ FILE: delegateWithAnonymousObject.kt super|>() } - public final var issueListView: R|IssueListView|by this@R|/IssuesListUserProfile|.R|/delegate|( = delegate@fun (): R|kotlin/properties/ReadWriteProperty| { + public final var issueListView: R|IssueListView|by this@R|/IssuesListUserProfile|.R|/delegate|( = delegate@fun (): R|kotlin/properties/ReadWriteProperty| { ^ object : R|kotlin/properties/ReadWriteProperty| { private constructor(): R|| { super() diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/propertyWithFunctionalType.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/propertyWithFunctionalType.fir.txt index f0c5fdf3d63..8d67d71d770 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/propertyWithFunctionalType.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/propertyWithFunctionalType.fir.txt @@ -10,7 +10,7 @@ FILE: propertyWithFunctionalType.kt ^property Null(null)!! } - public final var conventer: R|(B) -> B|by this@R|/A|.R|/A.property| B|>(property@fun (it: R|B|): R|B| { + public final var conventer: R|(B) -> B|by this@R|/A|.R|/A.property| B|>(property@fun (it: R|B|): R|B| { ^ R|/it| } ) @@ -21,7 +21,7 @@ FILE: propertyWithFunctionalType.kt this@R|/A|.D|/A.conventer|.R|SubstitutionOverride|(this@R|/A|, ::R|/A.conventer|, R|/conventer|) } - public final var conventerWithExpectedType: R|(B) -> B|by this@R|/A|.R|/A.property| B|>(property@fun (it: R|B|): R|B| { + public final var conventerWithExpectedType: R|(B) -> B|by this@R|/A|.R|/A.property| B|>(property@fun (it: R|B|): R|B| { ^ R|/it| } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/functionX.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/functionX.fir.txt index 25d580410b7..7014cc9088d 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/functionX.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/functionX.fir.txt @@ -1,10 +1,10 @@ FILE: functionX.kt - public final val x: R|kotlin/jvm/functions/Function0| = fun (): R|kotlin/Int| { + public final val x: R|kotlin/jvm/functions/Function0| = fun (): R|kotlin/Int| { ^ Int(42) } public get(): R|kotlin/jvm/functions/Function0| - public final val y: R|(kotlin/String) -> kotlin/String| = fun (it: R|kotlin/String|): R|kotlin/String| { + public final val y: R|(kotlin/String) -> kotlin/String| = fun (it: R|kotlin/String|): R|kotlin/String| { ^ R|/it| } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/hashMapTypeAlias.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/hashMapTypeAlias.fir.txt index 9322eb4c238..471c9e5860f 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/hashMapTypeAlias.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/hashMapTypeAlias.fir.txt @@ -3,7 +3,7 @@ FILE: hashMapTypeAlias.kt public final fun R|MyT|.add(x: R|X|, y: R|kotlin/Int|): R|kotlin/Unit| { } public final fun main(): R|kotlin/Unit| { - R|java/util/HashMap.HashMap|().R|kotlin/apply||>( = apply@fun R|java/util/HashMap|.(): R|kotlin/Unit| { + R|java/util/HashMap.HashMap|().R|kotlin/apply||>( = apply@fun R|java/util/HashMap|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|/add|(String(1), Int(2)) } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/hashTableWithForEach.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/hashTableWithForEach.fir.txt index 347fada7da3..362376ce6c5 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/hashTableWithForEach.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/hashTableWithForEach.fir.txt @@ -13,8 +13,8 @@ FILE: hashTableWithForEach.kt public get(): R|kotlin/collections/MutableSet>| { when () { R|/DEBUG| -> { - ^ Q|java/util/Collections|.R|java/util/Collections.unmodifiableSet|, kotlin/collections/MutableMap.MutableEntry?>|>(R|kotlin/collections/mutableSetOf||>().R|kotlin/apply|>|>( = apply@fun R|kotlin/collections/MutableSet>|.(): R|kotlin/Unit| { - this@R|/SomeHashTable|.R|/SomeHashTable.forEach|( = forEach@fun (key: R|K|, value: R|V|): R|kotlin/Unit| { + ^ Q|java/util/Collections|.R|java/util/Collections.unmodifiableSet|, kotlin/collections/MutableMap.MutableEntry?>|>(R|kotlin/collections/mutableSetOf||>().R|kotlin/apply|>|>( = apply@fun R|kotlin/collections/MutableSet>|.(): R|kotlin/Unit| { + this@R|/SomeHashTable|.R|/SomeHashTable.forEach|( = forEach@fun (key: R|K|, value: R|V|): R|kotlin/Unit| { this@R|special/anonymous|.R|SubstitutionOverride|(R|SubstitutionOverride|(R|/key|, R|/value|)) } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/implicitReceiverOrder.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/implicitReceiverOrder.fir.txt index f19eee859d1..3d565ef6c64 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/implicitReceiverOrder.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/implicitReceiverOrder.fir.txt @@ -28,16 +28,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| { + 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|special/anonymous|.R|/A.foo|() ^ (this@R|special/anonymous|, 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| { + 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|special/anonymous|.R|/B.foo|() ^ (this@R|special/anonymous|, this@R|special/anonymous|).R|/A.bar|() } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/inapplicableRemoveAll.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/inapplicableRemoveAll.fir.txt index 3b84d045567..b082ea327d7 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/inapplicableRemoveAll.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/inapplicableRemoveAll.fir.txt @@ -1,6 +1,6 @@ FILE: inapplicableRemoveAll.kt public final fun test(list: R|kotlin/collections/MutableList|): R|kotlin/Unit| { - R|/list|.R|kotlin/collections/removeAll|( = removeAll@fun (it: R|kotlin/String|): R|kotlin/Boolean| { + R|/list|.R|kotlin/collections/removeAll|( = removeAll@fun (it: R|kotlin/String|): R|kotlin/Boolean| { ^ R|/it|.R|kotlin/text/isEmpty|() } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/builderInference.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/builderInference.fir.txt index 826f6fab14b..37524d54446 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/builderInference.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/builderInference.fir.txt @@ -5,7 +5,7 @@ FILE: builderInference.kt public final fun takeString(s: R|kotlin/String|): R|kotlin/Unit| { } public final fun test(): R|kotlin/Unit| { - lval s: R|kotlin/String| = R|/foo|( = foo@fun R|kotlin/collections/MutableList|.(): R|kotlin/Unit| { + lval s: R|kotlin/String| = R|/foo|( = foo@fun R|kotlin/collections/MutableList|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|SubstitutionOverride|(String()) } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/builderInferenceAndCoercionToUnit.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/builderInferenceAndCoercionToUnit.fir.txt index 9f20cb518cb..3e92ce56a8d 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/builderInferenceAndCoercionToUnit.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/builderInferenceAndCoercionToUnit.fir.txt @@ -9,7 +9,7 @@ FILE: builderInferenceAndCoercionToUnit.kt } public final fun test(strings: R|kotlin/collections/List|): R|kotlin/Unit| { - lval dropDown: R|DropDownComponent| = R|/DropDownComponent.DropDownComponent|(initialValues = R|kotlin/collections/buildList|( = buildList@fun R|kotlin/collections/MutableList|.(): R|kotlin/Unit| { + lval dropDown: R|DropDownComponent| = R|/DropDownComponent.DropDownComponent|(initialValues = R|kotlin/collections/buildList|( = buildList@fun R|kotlin/collections/MutableList|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|SubstitutionOverride|(R|/strings|) } )) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/builderInferenceFromStdlib.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/builderInferenceFromStdlib.fir.txt index 03d82157f11..4ee2928b5a1 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/builderInferenceFromStdlib.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/builderInferenceFromStdlib.fir.txt @@ -1,13 +1,13 @@ FILE: builderInferenceFromStdlib.kt public final fun test_1(): R|kotlin/Unit| { - lval list: R|kotlin/collections/List| = R|kotlin/collections/buildList|( = buildList@fun R|kotlin/collections/MutableList|.(): R|kotlin/Unit| { + lval list: R|kotlin/collections/List| = R|kotlin/collections/buildList|( = buildList@fun R|kotlin/collections/MutableList|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|SubstitutionOverride|(String()) } ) R|/takeList|(R|/list|) } public final fun test_2(): R|kotlin/Unit| { - lval list: R|kotlin/collections/List| = R|/myBuildList|( = myBuildList@fun R|kotlin/collections/MutableList|.(): R|kotlin/Unit| { + lval list: R|kotlin/collections/List| = R|/myBuildList|( = myBuildList@fun R|kotlin/collections/MutableList|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|SubstitutionOverride|(String()) } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/complexConstraintSystem.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/complexConstraintSystem.fir.txt index 022b0871aa9..4465be24ec0 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/complexConstraintSystem.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/complexConstraintSystem.fir.txt @@ -9,7 +9,7 @@ FILE: complexConstraintSystem.kt } public final fun test_0(list: R|kotlin/collections/List|, b: R|kotlin/Boolean|): R|kotlin/Unit| { - lval x: R|kotlin/Int| = R|/list|.R|kotlin/collections/mapNotNull||>( = mapNotNull@fun (it: R|kotlin/Int|): R|Inv?| { + lval x: R|kotlin/Int| = R|/list|.R|kotlin/collections/mapNotNull||>( = mapNotNull@fun (it: R|kotlin/Int|): R|Inv?| { ^ when () { R|/b| -> { R|/Inv.Inv|(R|/it|) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/plusAssignWithLambdaInRhs.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/plusAssignWithLambdaInRhs.dot index 8bb516ef204..6b4523b8d19 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/plusAssignWithLambdaInRhs.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/plusAssignWithLambdaInRhs.dot @@ -124,8 +124,8 @@ digraph plusAssignWithLambdaInRhs_kt { } 32 [label="Postponed exit from lambda"]; 33 [label="Function call: R|/A.A|(...)"]; - 34 [label="Jump: ^postpone R|/A.A|( = A@fun (resolve: R|(T) -> kotlin/Unit|): R|kotlin/Unit| { - R|/queue|.R|kotlin/collections/plusAssign| kotlin/Unit|>(A@fun (): R|kotlin/Unit| { + 34 [label="Jump: ^postpone R|/A.A|( = A@fun (resolve: R|(T) -> kotlin/Unit|): R|kotlin/Unit| { + R|/queue|.R|kotlin/collections/plusAssign| kotlin/Unit|>(A@fun (): R|kotlin/Unit| { R|/resolve|.R|SubstitutionOverride|(R|/computation|.R|SubstitutionOverride|()) } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/plusAssignWithLambdaInRhs.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/plusAssignWithLambdaInRhs.fir.txt index b56f0fc167c..a7ace331144 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/plusAssignWithLambdaInRhs.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/plusAssignWithLambdaInRhs.fir.txt @@ -1,7 +1,7 @@ FILE: plusAssignWithLambdaInRhs.kt public final fun test(): R|kotlin/Unit| { lval list: R|kotlin/collections/MutableList>| = Null(null)!! - R|/list|.R|kotlin/collections/plusAssign| kotlin/String|>(fun (it: R|kotlin/String|): R|kotlin/String| { + R|/list|.R|kotlin/collections/plusAssign| kotlin/String|>(fun (it: R|kotlin/String|): R|kotlin/String| { ^ R|/it| } ) @@ -17,8 +17,8 @@ FILE: plusAssignWithLambdaInRhs.kt } public final fun postpone(computation: R|() -> T|): R|A| { lval queue: R|kotlin/collections/MutableList>| = R|kotlin/collections/mutableListOf| kotlin/Unit|>() - ^postpone R|/A.A|( = A@fun (resolve: R|(T) -> kotlin/Unit|): R|kotlin/Unit| { - R|/queue|.R|kotlin/collections/plusAssign| kotlin/Unit|>(A@fun (): R|kotlin/Unit| { + ^postpone R|/A.A|( = A@fun (resolve: R|(T) -> kotlin/Unit|): R|kotlin/Unit| { + R|/queue|.R|kotlin/collections/plusAssign| kotlin/Unit|>(A@fun (): R|kotlin/Unit| { R|/resolve|.R|SubstitutionOverride|(R|/computation|.R|SubstitutionOverride|()) } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/FunctionTypeInJava.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/FunctionTypeInJava.fir.txt index 1ca517a721d..a7d5ff2567c 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/FunctionTypeInJava.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/FunctionTypeInJava.fir.txt @@ -1,23 +1,23 @@ FILE: main.kt public final fun main(): R|kotlin/Unit| { - Q|JavaClass|.R|/JavaClass.foo1|( = foo1@fun (): R|ft| { + Q|JavaClass|.R|/JavaClass.foo1|( = foo1@fun (): R|ft| { ^ Int(123) } ) - Q|JavaClass|.R|/JavaClass.foo2|( = foo2@fun (it: R|ft|): R|ft| { + Q|JavaClass|.R|/JavaClass.foo2|( = foo2@fun (it: R|ft|): R|ft| { ^ R|/it|.R|kotlin/Int.plus|(Int(2)).R|kotlin/Any.toString|() } ) - Q|JavaClass|.R|/JavaClass.foo2|(foo2@fun (it: R|ft|): R|ft| { + Q|JavaClass|.R|/JavaClass.foo2|(foo2@fun (it: R|ft|): R|ft| { ^ R|/it|.R|kotlin/Int.plus|(Int(3)).R|kotlin/Any.toString|() } ) - lval y: R|(kotlin/Int) -> kotlin/String| = fun (x: R|kotlin/Int|): R|kotlin/String| { + lval y: R|(kotlin/Int) -> kotlin/String| = fun (x: R|kotlin/Int|): R|kotlin/String| { ^ R|/x|.R|kotlin/Any.toString|() } Q|JavaClass|.R|/JavaClass.foo2|(R|/y|) - Q|JavaClass|.R|/JavaClass.foo3||>(foo3@fun (it: R|ft|): R|ft| { + Q|JavaClass|.R|/JavaClass.foo3||>(foo3@fun (it: R|ft|): R|ft| { ^ R|/it|.R|kotlin/Int.plus|(Int(4)).R|kotlin/Any.toString|() } , Int(5)) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MapCompute.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MapCompute.fir.txt index 7047443a9f9..7a9f965f799 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MapCompute.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MapCompute.fir.txt @@ -1,6 +1,6 @@ FILE: MapCompute.kt public final fun R|kotlin/collections/MutableMap>|.initAndAdd(key: R|kotlin/String|, value: R|D|): R|kotlin/Unit| { - this@R|/initAndAdd|.R|SubstitutionOverride?|>|(R|/key|, = compute@fun (_: R|ft|, maybeValues: R|ft, kotlin/collections/MutableSet?>|): R|ft, kotlin/collections/MutableSet?>| { + this@R|/initAndAdd|.R|SubstitutionOverride?|>|(R|/key|, = compute@fun (_: R|ft|, maybeValues: R|ft, kotlin/collections/MutableSet?>|): R|ft, kotlin/collections/MutableSet?>| { lval setOfValues: R|kotlin/collections/MutableSet| = R|/maybeValues| ?: R|kotlin/collections/mutableSetOf|() R|/setOfValues|.R|SubstitutionOverride|(R|/value|) ^ R|/setOfValues| diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MyMap.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MyMap.fir.txt index 408b189c1f4..cd719e7a34d 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MyMap.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/MyMap.fir.txt @@ -1,18 +1,18 @@ FILE: test.kt public final fun test(map: R|MyMap|): R|kotlin/Unit| { - lval result: R|ft| = R|/map|.R|kotlin/collections/getOrPut||, R|ft|>(String(key), = getOrPut@fun (): R|ft| { + lval result: R|ft| = R|/map|.R|kotlin/collections/getOrPut||, R|ft|>(String(key), = getOrPut@fun (): R|ft| { ^ String(value) } ) lval otherResult: R|ft| = R|/map|.R|SubstitutionOverride|>|(String(key), String(value)) lval anotherResult: R|kotlin/String?| = R|/map|.R|SubstitutionOverride|(String(key), String(value)) - R|/map|.R|SubstitutionOverride|( = forEach@fun (key: R|ft|, value: R|ft|): R|kotlin/Unit| { + R|/map|.R|SubstitutionOverride|( = forEach@fun (key: R|ft|, value: R|ft|): R|kotlin/Unit| { R|kotlin/io/println|((R|/key|.R|kotlin/Any.toString|(), String(: ), R|/value|.R|kotlin/Any.toString|())) R|/key|.R|kotlin/String.length| R|/value|.R|kotlin/String.length| } ) - R|/map|.R|kotlin/collections/forEach||, R|ft|>( = forEach@fun (: R|kotlin/collections/Map.Entry, ft>|): R|kotlin/Unit| { + R|/map|.R|kotlin/collections/forEach||, R|ft|>( = forEach@fun (: R|kotlin/collections/Map.Entry, ft>|): R|kotlin/Unit| { lval key: R|ft| = R|/|.R|kotlin/collections/component1||, R|ft|>() lval value: R|ft| = R|/|.R|kotlin/collections/component2||, R|ft|>() R|kotlin/io/println|((R|/key|.R|kotlin/Any.toString|(), String(: ), R|/value|.R|kotlin/Any.toString|())) @@ -22,19 +22,19 @@ FILE: test.kt ) } public final fun test(map: R|kotlin/collections/MutableMap|): R|kotlin/Unit| { - lval result: R|kotlin/String| = R|/map|.R|kotlin/collections/getOrPut|(String(key), = getOrPut@fun (): R|kotlin/String| { + lval result: R|kotlin/String| = R|/map|.R|kotlin/collections/getOrPut|(String(key), = getOrPut@fun (): R|kotlin/String| { ^ String(value) } ) lval otherResult: R|kotlin/String| = R|/map|.R|SubstitutionOverride|(String(key), String(value)) lval anotherResult: R|kotlin/String?| = R|/map|.R|SubstitutionOverride|(String(key), String(value)) - R|/map|.R|SubstitutionOverride|( = forEach@fun (key: R|ft|, value: R|ft|): R|kotlin/Unit| { + R|/map|.R|SubstitutionOverride|( = forEach@fun (key: R|ft|, value: R|ft|): R|kotlin/Unit| { R|kotlin/io/println|((R|/key|.R|kotlin/Any.toString|(), String(: ), R|/value|.R|kotlin/Any.toString|())) R|/key|.R|kotlin/String.length| R|/value|.R|kotlin/String.length| } ) - R|/map|.R|kotlin/collections/forEach|( = forEach@fun (: R|kotlin/collections/Map.Entry|): R|kotlin/Unit| { + R|/map|.R|kotlin/collections/forEach|( = forEach@fun (: R|kotlin/collections/Map.Entry|): R|kotlin/Unit| { lval key: R|kotlin/String| = R|/|.R|kotlin/collections/component1|() lval value: R|kotlin/String| = R|/|.R|kotlin/collections/component2|() R|kotlin/io/println|((R|/key|.R|kotlin/Any.toString|(), String(: ), R|/value|.R|kotlin/Any.toString|())) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/SyntheticAfterFiltering.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/SyntheticAfterFiltering.fir.txt index c393f037737..7863851c251 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/SyntheticAfterFiltering.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/SyntheticAfterFiltering.fir.txt @@ -1,6 +1,6 @@ FILE: test.kt public final fun foo(tag: R|XmlTag|, name: R|kotlin/String|): R|kotlin/collections/List| { - lval result: R|kotlin/collections/List| = R|/tag|.R|/PsiElement.children|.R|kotlin/collections/filterIsInstance|().R|kotlin/collections/filter|( = filter@fun (it: R|XmlTag|): R|kotlin/Boolean| { + lval result: R|kotlin/collections/List| = R|/tag|.R|/PsiElement.children|.R|kotlin/collections/filterIsInstance|().R|kotlin/collections/filter|( = filter@fun (it: R|XmlTag|): R|kotlin/Boolean| { ^ ==(R|/it|.R|/XmlTag.localName|, R|/name|) } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/SyntheticWithForEach.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/SyntheticWithForEach.fir.txt index 0d6356b95e9..aaac049fd69 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/SyntheticWithForEach.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/SyntheticWithForEach.fir.txt @@ -1,11 +1,11 @@ FILE: test.kt public final fun R|Call|.testForEach(): R|kotlin/Unit| { - this@R|/testForEach|.R|/Call.arguments|.R|SubstitutionOverride|( = forEach@fun (key: R|ft|, value: R|ft|): R|kotlin/Unit| { + this@R|/testForEach|.R|/Call.arguments|.R|SubstitutionOverride|( = 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|/testForEach|.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|SubstitutionOverride|>|.R|kotlin/String.length| R|/it|.R|SubstitutionOverride|>|.R|kotlin/String.length| } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/mapMerge.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/mapMerge.fir.txt index dfb0c9a39dd..16bc7f57abb 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/mapMerge.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/mapMerge.fir.txt @@ -1,6 +1,6 @@ FILE: mapMerge.kt public final fun foo(x: R|kotlin/collections/MutableMap>|): R|kotlin/Unit| { - R|/x|.R|SubstitutionOverride?|>|(String(), R|kotlin/collections/listOf|(String()), = merge@fun (a: R|ft, kotlin/collections/List?>|, b: R|ft, kotlin/collections/List?>|): R|ft, kotlin/collections/List?>| { + R|/x|.R|SubstitutionOverride?|>|(String(), R|kotlin/collections/listOf|(String()), = merge@fun (a: R|ft, kotlin/collections/List?>|, b: R|ft, kotlin/collections/List?>|): R|ft, kotlin/collections/List?>| { ^ R|/a|.R|kotlin/collections/plus|(R|/b|) } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/javaLangComparator.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/javaLangComparator.fir.txt index efc98cf7d84..4231491c702 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/javaLangComparator.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/javaLangComparator.fir.txt @@ -1,6 +1,6 @@ FILE: javaLangComparator.kt public final fun test_2(list: R|kotlin/collections/List|): R|kotlin/Unit| { - lval comp: R|java/util/Comparator>| = Q|java/util|.R|java/util/Comparator||>( = Comparator@fun (x: R|ft|, y: R|ft|): R|kotlin/Int| { + lval comp: R|java/util/Comparator>| = Q|java/util|.R|java/util/Comparator||>( = Comparator@fun (x: R|ft|, y: R|ft|): R|kotlin/Int| { ^ Int(1) } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/kotlinComparatorAlias.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/kotlinComparatorAlias.fir.txt index 66a62f3a648..a25562bf8c3 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/kotlinComparatorAlias.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/kotlinComparatorAlias.fir.txt @@ -1,6 +1,6 @@ FILE: kotlinComparatorAlias.kt public final fun test_1(): R|kotlin/Unit| { - lval comp: R|java/util/Comparator>| = R|java/util/Comparator||>( = Comparator@fun (x: R|ft|, y: R|ft|): R|kotlin/Int| { + lval comp: R|java/util/Comparator>| = R|java/util/Comparator||>( = Comparator@fun (x: R|ft|, y: R|ft|): R|kotlin/Int| { ^ Int(1) } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/mapList.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/mapList.fir.txt index bfd9ded5db9..275831636a6 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/mapList.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/mapList.fir.txt @@ -1,11 +1,11 @@ FILE: mapList.kt public final fun main(): R|kotlin/Unit| { lval x: R|kotlin/collections/List| = R|kotlin/collections/emptyList|() - lval u: R|kotlin/collections/List| = R|/x|.R|kotlin/collections/map|( = map@fun (it: R|kotlin/Int|): R|kotlin/Int| { + lval u: R|kotlin/collections/List| = R|/x|.R|kotlin/collections/map|( = map@fun (it: R|kotlin/Int|): R|kotlin/Int| { ^ R|/it|.R|kotlin/Int.plus|(R|/it|) } ) - R|/u|.R|/applyX||>( = applyX@fun R|kotlin/collections/List|.(): R|kotlin/Unit| { + R|/u|.R|/applyX||>( = applyX@fun R|kotlin/collections/List|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|SubstitutionOverride|(Int(1)) this@R|special/anonymous|.R|SubstitutionOverride|(Int(1)) } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/multipleImplicitReceivers.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/multipleImplicitReceivers.fir.txt index 69973865c94..ed5ab843dc3 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/multipleImplicitReceivers.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/multipleImplicitReceivers.fir.txt @@ -25,10 +25,10 @@ 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| { + 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|special/anonymous|, this@R|special/anonymous|).R|/IFoo.foo| - ^ R|kotlin/with|(R|/invokeImpl|, = with@fun R|IInvoke|.(): R|kotlin/Int| { + ^ R|kotlin/with|(R|/invokeImpl|, = with@fun R|IInvoke|.(): R|kotlin/Int| { ^ (this@R|special/anonymous|, (this@R|special/anonymous|, this@R|special/anonymous|).R|/IFoo.foo|).R|/IInvoke.invoke|() } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/noneWithForEach.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/noneWithForEach.fir.txt index 3a2d20e21f1..d8902a90d4b 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/noneWithForEach.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/noneWithForEach.fir.txt @@ -6,13 +6,13 @@ FILE: noneWithForEach.kt } public final fun foo(conflicting: R|kotlin/collections/List|): R|kotlin/Unit| { lval filtered: R|kotlin/collections/ArrayList| = R|kotlin/collections/arrayListOf|() - R|/conflicting|.R|kotlin/collections/groupBy|( = groupBy@fun (it: R|Diagnostic|): R|kotlin/String| { + R|/conflicting|.R|kotlin/collections/groupBy|( = groupBy@fun (it: R|Diagnostic|): R|kotlin/String| { ^ R|/it|.R|/Diagnostic.name| } - ).R|kotlin/collections/forEach||>( = forEach@fun (it: R|kotlin/collections/Map.Entry>|): R|kotlin/Unit| { + ).R|kotlin/collections/forEach||>( = forEach@fun (it: R|kotlin/collections/Map.Entry>|): R|kotlin/Unit| { lval diagnostics: R|kotlin/collections/List| = R|/it|.R|SubstitutionOverride|>| - R|/filtered|.R|SubstitutionOverride|(R|/diagnostics|.R|kotlin/collections/filter|( = filter@fun (me: R|Diagnostic|): R|kotlin/Boolean| { - ^ R|/diagnostics|.R|kotlin/collections/none|( = none@fun (other: R|Diagnostic|): R|kotlin/Boolean| { + R|/filtered|.R|SubstitutionOverride|(R|/diagnostics|.R|kotlin/collections/filter|( = filter@fun (me: R|Diagnostic|): R|kotlin/Boolean| { + ^ R|/diagnostics|.R|kotlin/collections/none|( = none@fun (other: R|Diagnostic|): R|kotlin/Boolean| { ^ !=(R|/me|, R|/other|) } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/plusAssignNullable.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/plusAssignNullable.fir.txt index fe4da4544ed..247ea43f5a1 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/plusAssignNullable.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/plusAssignNullable.fir.txt @@ -11,7 +11,7 @@ FILE: plusAssignNullable.kt } public final fun R|B|.foo(a: R|A?|): R|kotlin/Unit| { this@R|/foo|.R|/B.list|.R|kotlin/collections/plusAssign|(R|kotlin/collections/mutableListOf|(vararg(String()))) - R|kotlin/with|(R|/a|, = with@fun R|A?|.(): R|kotlin/Unit| { + R|kotlin/with|(R|/a|, = with@fun R|A?|.(): R|kotlin/Unit| { this@R|/foo|.R|/B.list|.R|kotlin/collections/plusAssign|(R|kotlin/collections/mutableListOf|(vararg(String()))) this@R|/foo|.R|/B.list|.R|kotlin/collections/plusAssign|(R|kotlin/collections/mutableListOf|(vararg(String()))) } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/DeepCopyIrTree.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/DeepCopyIrTree.fir.txt index 6167084b7c8..ee3e334b5f5 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/DeepCopyIrTree.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/DeepCopyIrTree.fir.txt @@ -37,17 +37,17 @@ FILE: DeepCopyIrTree.kt } public final fun R|IrTypeParametersContainer|.copyTypeParametersFrom(other: R|IrTypeParametersContainer|): R|kotlin/Unit| { - this@R|/DeepCopyIrTreeWithSymbols.copyTypeParametersFrom|.R|/IrTypeParametersContainer.typeParameters| = R|/other|.R|/IrTypeParametersContainer.typeParameters|.R|kotlin/collections/map|( = map@fun (it: R|IrTypeParameter|): R|IrTypeParameter| { + this@R|/DeepCopyIrTreeWithSymbols.copyTypeParametersFrom|.R|/IrTypeParametersContainer.typeParameters| = R|/other|.R|/IrTypeParametersContainer.typeParameters|.R|kotlin/collections/map|( = map@fun (it: R|IrTypeParameter|): R|IrTypeParameter| { ^ this@R|/DeepCopyIrTreeWithSymbols|.R|/DeepCopyIrTreeWithSymbols.copyTypeParameter|(R|/it|) } ) - this@R|/DeepCopyIrTreeWithSymbols|.R|/DeepCopyIrTreeWithSymbols.typeRemapper|.R|/withinScope|(this@R|/DeepCopyIrTreeWithSymbols.copyTypeParametersFrom|, = withinScope@fun (): R|kotlin/Unit| { + this@R|/DeepCopyIrTreeWithSymbols|.R|/DeepCopyIrTreeWithSymbols.typeRemapper|.R|/withinScope|(this@R|/DeepCopyIrTreeWithSymbols.copyTypeParametersFrom|, = withinScope@fun (): R|kotlin/Unit| { lval : R|kotlin/collections/Iterator>| = this@R|/DeepCopyIrTreeWithSymbols.copyTypeParametersFrom|.R|/IrTypeParametersContainer.typeParameters|.R|kotlin/collections/zip|(R|/other|.R|/IrTypeParametersContainer.typeParameters|).R|SubstitutionOverride>|>|() while(R|/|.R|kotlin/collections/Iterator.hasNext|()) { lval : R|kotlin/Pair| = R|/|.R|SubstitutionOverride|>|() lval thisTypeParameter: R|IrTypeParameter| = R|/|.R|SubstitutionOverride|() lval otherTypeParameter: R|IrTypeParameter| = R|/|.R|SubstitutionOverride|() - R|/otherTypeParameter|.R|/IrTypeParameter.superTypes|.R|kotlin/collections/mapTo||>(R|/thisTypeParameter|.R|/IrTypeParameter.superTypes|, = mapTo@fun (it: R|IrType|): R|IrType| { + R|/otherTypeParameter|.R|/IrTypeParameter.superTypes|.R|kotlin/collections/mapTo||>(R|/thisTypeParameter|.R|/IrTypeParameter.superTypes|, = mapTo@fun (it: R|IrType|): R|IrType| { ^ this@R|/DeepCopyIrTreeWithSymbols|.R|/DeepCopyIrTreeWithSymbols.typeRemapper|.R|/TypeRemapper.remapType|(R|/it|) } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/SpecialCallsWithLambdas.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/SpecialCallsWithLambdas.fir.txt index fb5571c8710..3f702d7a4d7 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/SpecialCallsWithLambdas.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/SpecialCallsWithLambdas.fir.txt @@ -1,14 +1,14 @@ FILE: SpecialCallsWithLambdas.kt public final fun foo(): R|kotlin/Unit| { - lval inv: R|() -> kotlin/Function0| = fun (): R|() -> kotlin/Unit| { - ^ fun (): R|kotlin/Unit| { + lval inv: R|() -> kotlin/Function0| = fun (): R|() -> kotlin/Unit| { + ^ fun (): R|kotlin/Unit| { ^ Unit } } !! - lval bar: R|() -> kotlin/Function0| = fun (): R|() -> kotlin/Unit| { - ^ fun (): R|kotlin/Unit| { + lval bar: R|() -> kotlin/Function0| = fun (): R|() -> kotlin/Unit| { + ^ fun (): R|kotlin/Unit| { ^ Unit } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/invokePriority.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/invokePriority.fir.txt index c094ebce781..451d41ad327 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/invokePriority.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/invokePriority.fir.txt @@ -5,7 +5,7 @@ FILE: invokePriority.kt } public final fun bar(): R|kotlin/Unit| { - lval foo: R|kotlin/String.() -> kotlin/Unit| = fun R|kotlin/String|.(): R|kotlin/Unit| { + lval foo: R|kotlin/String.() -> kotlin/Unit| = fun R|kotlin/String|.(): R|kotlin/Unit| { ^ Unit } @@ -13,7 +13,7 @@ FILE: invokePriority.kt } String(1).R|/foo|() - R|kotlin/with|(String(2), = with@fun R|kotlin/String|.(): R|kotlin/Unit| { + R|kotlin/with|(String(2), = with@fun R|kotlin/String|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|/foo|() } ) @@ -25,7 +25,7 @@ FILE: invokePriority.kt super() } - public final val foo: R|kotlin/String.() -> kotlin/Unit| = fun R|kotlin/String|.(): R|kotlin/Unit| { + public final val foo: R|kotlin/String.() -> kotlin/Unit| = fun R|kotlin/String|.(): R|kotlin/Unit| { ^ Unit } @@ -36,7 +36,7 @@ FILE: invokePriority.kt public final fun bar(): R|kotlin/Unit| { (this@R|/B|, String(1)).R|/B.foo|() - R|kotlin/with|(String(2), = with@fun R|kotlin/String|.(): R|kotlin/Unit| { + R|kotlin/with|(String(2), = with@fun R|kotlin/String|.(): R|kotlin/Unit| { (this@R|/B|, this@R|special/anonymous|).R|/B.foo|() } ) @@ -64,7 +64,7 @@ FILE: invokePriority.kt super() } - public final val f: R|() -> kotlin/Unit| = fun (): R|kotlin/Unit| { + public final val f: R|() -> kotlin/Unit| = fun (): R|kotlin/Unit| { ^ Unit } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/invokePriorityComplex.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/invokePriorityComplex.fir.txt index b9b5de53eb4..667fb3b21ec 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/invokePriorityComplex.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/invokePriorityComplex.fir.txt @@ -60,7 +60,7 @@ FILE: invokePriorityComplex.kt public final fun main(): R|kotlin/Unit| { Q|E.foo|.R|/E.foo.a| Q|E.foo| - R|kotlin/with|(Q|E.foo|, = with@fun R|E.foo|.(): R|kotlin/Int| { + R|kotlin/with|(Q|E.foo|, = with@fun R|E.foo|.(): R|kotlin/Int| { ^ this@R|special/anonymous|.R|/E.foo.a| } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/qualifierPriority.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/qualifierPriority.fir.txt index c27f1ba5d91..cda68bab84b 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/qualifierPriority.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/qualifierPriority.fir.txt @@ -60,7 +60,7 @@ FILE: qualifierPriority.kt public final fun main(): R|kotlin/Unit| { Q|F.foo|.R|/F.foo.a| Q|F.foo| - R|kotlin/with|(Q|F.foo|, = with@fun R|F.foo|.(): R|kotlin/Int| { + R|kotlin/with|(Q|F.foo|, = with@fun R|F.foo|.(): R|kotlin/Int| { ^ this@R|special/anonymous|.R|/F.foo.a| } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/receiverResolutionInLambda.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/receiverResolutionInLambda.fir.txt index 8c5edf1996f..07164dec15d 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/receiverResolutionInLambda.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/receiverResolutionInLambda.fir.txt @@ -5,7 +5,7 @@ FILE: receiverResolutionInLambda.kt } public final fun foo(): R|kotlin/Unit| { - lval x: R|kotlin/sequences/Sequence| = R|kotlin/sequences/sequence|( = sequence@fun R|kotlin/sequences/SequenceScope|.(): R|kotlin/Unit| { + lval x: R|kotlin/sequences/Sequence| = R|kotlin/sequences/sequence|( = sequence@fun R|kotlin/sequences/SequenceScope|.(): R|kotlin/Unit| { lval y: R|kotlin/sequences/SequenceScope| = this@R|special/anonymous| this@R|special/anonymous|.R|SubstitutionOverride|(String()) this@R|special/anonymous|.R|SubstitutionOverride|(String()) @@ -18,7 +18,7 @@ FILE: receiverResolutionInLambda.kt } public final fun case2(): R|kotlin/Unit| { - lval x: R|kotlin/sequences/Sequence| = R|kotlin/sequences/sequence|( = sequence@fun R|kotlin/sequences/SequenceScope|.(): R|kotlin/Unit| { + lval x: R|kotlin/sequences/Sequence| = R|kotlin/sequences/sequence|( = sequence@fun R|kotlin/sequences/SequenceScope|.(): R|kotlin/Unit| { lval y: R|kotlin/sequences/SequenceScope| = this@R|special/anonymous| this@R|special/anonymous|.R|SubstitutionOverride|(String()) this@R|special/anonymous|.R|SubstitutionOverride|(String()) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/selfReferenceToCompanionObject.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/selfReferenceToCompanionObject.fir.txt index 70951a63eaa..bc0d1e28ff7 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/selfReferenceToCompanionObject.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/selfReferenceToCompanionObject.fir.txt @@ -15,8 +15,8 @@ FILE: selfReferenceToCompanionObject.kt public final companion object Companion : R|Base| { private constructor(): R|Host.Companion| { - super(R|kotlin/run| kotlin/String|>( = run@fun (): R|() -> kotlin/String| { - ^ run@fun (): R|kotlin/String| { + super(R|kotlin/run| kotlin/String|>( = run@fun (): R|() -> kotlin/String| { + ^ run@fun (): R|kotlin/String| { ^ Q|Host|.R|/Host.Companion.ok|() } @@ -44,8 +44,8 @@ FILE: selfReferenceToCompanionObject.kt public final static enum entry FOO: R|Test| = object : R|Test| { private constructor(): R|| { - super(String(O), this@R|kotlin/Enum.Companion|.R|kotlin/run| kotlin/String|>( = run@fun R|kotlin/Enum.Companion|.(): R|() -> kotlin/String| { - ^ run@fun (): R|kotlin/String| { + super(String(O), this@R|kotlin/Enum.Companion|.R|kotlin/run| kotlin/String|>( = run@fun R|kotlin/Enum.Companion|.(): R|() -> kotlin/String| { + ^ run@fun (): R|kotlin/String| { ^ R|/Test.FOO|.R|/Test.x| } @@ -56,7 +56,7 @@ FILE: selfReferenceToCompanionObject.kt public final override val y: R|kotlin/String| = String(K) public get(): R|kotlin/String| - public final val closure2: R|() -> kotlin/String| = fun (): R|kotlin/String| { + public final val closure2: R|() -> kotlin/String| = fun (): R|kotlin/String| { ^ this@R|/|.R|/.y| } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/valueOfOrNull.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/valueOfOrNull.fir.txt index 6c789a911cb..29b7586f0f2 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/valueOfOrNull.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/valueOfOrNull.fir.txt @@ -13,11 +13,11 @@ FILE: valueOfOrNull.kt } public final fun foo(s: R|kotlin/String?|): R|kotlin/Unit| { - lval result: R|SomeEnum| = R|/s|?.{ $subj$.R|kotlin/let|( = let@fun (it: R|kotlin/String|): R|SomeEnum?| { + lval result: R|SomeEnum| = R|/s|?.{ $subj$.R|kotlin/let|( = let@fun (it: R|kotlin/String|): R|SomeEnum?| { ^ R|/valueOfOrNull|(R|/it|) } ) } ?: Q|SomeEnum|.R|/SomeEnum.ENTRY| - lval result2: R|SomeEnum| = R|/s|?.{ $subj$.R|kotlin/let|( = let@fun (it: R|kotlin/String|): R|SomeEnum?| { + lval result2: R|SomeEnum| = R|/s|?.{ $subj$.R|kotlin/let|( = let@fun (it: R|kotlin/String|): R|SomeEnum?| { ^ R|/valueOfOrNull|(R|/it|) } ) } ?: Q|SomeEnum|.R|/SomeEnum.ENTRY| @@ -35,7 +35,7 @@ FILE: valueOfOrNull.kt Q|SomeEnum|.R|/SomeEnum.ENTRY| } else -> { - R|/s|.R|kotlin/let|( = let@fun (it: R|kotlin/String|): R|SomeEnum?| { + R|/s|.R|kotlin/let|( = let@fun (it: R|kotlin/String|): R|SomeEnum?| { ^ R|/valueOfOrNull|(R|/it|) } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/recursiveBug.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/recursiveBug.fir.txt index f30097bfb48..643ffe411e7 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/recursiveBug.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/recursiveBug.fir.txt @@ -4,7 +4,7 @@ FILE: recursiveBug.kt super() } - public final val result: R|kotlin/String| = this@R|/Foo|.R|kotlin/run|( = run@fun R|Foo|.(): R|kotlin/String| { + public final val result: R|kotlin/String| = this@R|/Foo|.R|kotlin/run|( = run@fun R|Foo|.(): R|kotlin/String| { ^ R|/name|.R|SubstitutionOverride|() } ) @@ -15,7 +15,7 @@ FILE: recursiveBug.kt } public final fun bar(name: R|() -> kotlin/String|): R|kotlin/Unit| { - lval result: R|kotlin/String| = R|kotlin/run|( = run@fun (): R|kotlin/String| { + lval result: R|kotlin/String| = R|kotlin/run|( = run@fun (): R|kotlin/String| { ^ R|/name|.R|SubstitutionOverride|() } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/reinitializations/constructorVarWrite.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/reinitializations/constructorVarWrite.fir.txt index 05d357b1494..1c02a0a8f40 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/reinitializations/constructorVarWrite.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/reinitializations/constructorVarWrite.fir.txt @@ -17,7 +17,7 @@ FILE: constructorVarWrite.kt } - public final val y: R|kotlin/Int| = this@R|/Some|.R|kotlin/run|( = run@fun R|Some|.(): R|kotlin/Int| { + public final val y: R|kotlin/Int| = this@R|/Some|.R|kotlin/run|( = run@fun R|Some|.(): R|kotlin/Int| { this@R|special/anonymous|.R|/Some.foo| = Int(1) ^ this@R|special/anonymous|.R|/Some.foo| } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/removeIf.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/removeIf.fir.txt index a1bb195b429..b0f49bd57b8 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/removeIf.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/removeIf.fir.txt @@ -1,6 +1,6 @@ FILE: removeIf.kt public final fun test(collection: R|kotlin/collections/MutableCollection|): R|kotlin/Unit| { - R|/collection|.R|SubstitutionOverride|( = removeIf@fun (it: R|ft|): R|kotlin/Boolean| { + R|/collection|.R|SubstitutionOverride|( = removeIf@fun (it: R|ft|): R|kotlin/Boolean| { ^ R|/it| } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/runOnIntegerLiteral.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/runOnIntegerLiteral.fir.txt index e670a2c388a..bec0b5e30aa 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/runOnIntegerLiteral.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/runOnIntegerLiteral.fir.txt @@ -8,7 +8,7 @@ FILE: runOnIntegerLiteral.kt public get(): R|kotlin/Int| init { - Int(1).R|kotlin/run|( = run@fun R|kotlin/Int|.(): R|kotlin/Unit| { + Int(1).R|kotlin/run|( = run@fun R|kotlin/Int|.(): R|kotlin/Unit| { this@R|/TestInitValInLambdaCalledOnce|.R|/TestInitValInLambdaCalledOnce.x| = Int(0) } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/samForComparator.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/samForComparator.fir.txt index 6757e145567..5c18e887730 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/samForComparator.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/samForComparator.fir.txt @@ -2,7 +2,7 @@ FILE: samForComparator.kt public final fun foo(x: R|kotlin/Comparator|): R|kotlin/Unit| { } public final fun main(): R|kotlin/Unit| { - R|/foo|( = foo@fun (x: R|ft|, y: R|ft|): R|kotlin/Int| { + R|/foo|( = foo@fun (x: R|ft|, y: R|ft|): R|kotlin/Int| { ^ R|/x|.R|kotlin/CharSequence.length|.R|kotlin/Int.minus|(R|/y|.R|kotlin/CharSequence.length|) } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/simpleLazy.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/simpleLazy.fir.txt index cf5443addd3..01007686888 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/simpleLazy.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/simpleLazy.fir.txt @@ -1,5 +1,5 @@ FILE: simpleLazy.kt - public final val x: R|kotlin/String|by R|kotlin/lazy|( = lazy@fun (): R|kotlin/String| { + public final val x: R|kotlin/String|by R|kotlin/lazy|( = lazy@fun (): R|kotlin/String| { ^ String(Hello) } ) @@ -8,7 +8,7 @@ FILE: simpleLazy.kt } public final fun foo(): R|kotlin/Unit| { R|/x|.R|kotlin/String.length| - lval y: R|kotlin/String|by R|kotlin/lazy|( = lazy@fun (): R|kotlin/String| { + lval y: R|kotlin/String|by R|kotlin/lazy|( = lazy@fun (): R|kotlin/String| { ^ String(Bye) } ) @@ -19,7 +19,7 @@ FILE: simpleLazy.kt super() } - public final val z: R|kotlin/String|by R|kotlin/lazy|( = lazy@fun (): R|kotlin/String| { + public final val z: R|kotlin/String|by R|kotlin/lazy|( = lazy@fun (): R|kotlin/String| { ^ String(Some) } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/smartcasts/tryWithLambdaInside.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/smartcasts/tryWithLambdaInside.dot index 7bcdf3ccd03..06379f62af9 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/smartcasts/tryWithLambdaInside.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/smartcasts/tryWithLambdaInside.dot @@ -85,7 +85,7 @@ digraph tryWithLambdaInside_kt { 26 [label="Try expression exit"]; } 27 [label="Jump: ^testInPlace try { - R|/list|.R|kotlin/collections/filter|( = filter@fun (it: R|kotlin/Boolean|): R|kotlin/Boolean| { + R|/list|.R|kotlin/collections/filter|( = filter@fun (it: R|kotlin/Boolean|): R|kotlin/Boolean| { ^ R|/it| } ) @@ -176,7 +176,7 @@ finally { 51 [label="Try expression exit"]; } 52 [label="Jump: ^testNotInPlace try { - R|/list|.R|/notInPlaceFilter|( = notInPlaceFilter@fun (it: R|kotlin/Boolean|): R|kotlin/Boolean| { + R|/list|.R|/notInPlaceFilter|( = notInPlaceFilter@fun (it: R|kotlin/Boolean|): R|kotlin/Boolean| { ^ R|/it| } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/smartcasts/tryWithLambdaInside.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/smartcasts/tryWithLambdaInside.fir.txt index 7edf964115a..b9ccd28e37c 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/smartcasts/tryWithLambdaInside.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/smartcasts/tryWithLambdaInside.fir.txt @@ -6,7 +6,7 @@ FILE: tryWithLambdaInside.kt } public final fun testInPlace(list: R|kotlin/collections/List|): R|kotlin/collections/List| { ^testInPlace try { - R|/list|.R|kotlin/collections/filter|( = filter@fun (it: R|kotlin/Boolean|): R|kotlin/Boolean| { + R|/list|.R|kotlin/collections/filter|( = filter@fun (it: R|kotlin/Boolean|): R|kotlin/Boolean| { ^ R|/it| } ) @@ -17,7 +17,7 @@ FILE: tryWithLambdaInside.kt } public final fun testNotInPlace(list: R|kotlin/collections/List|): R|kotlin/collections/List| { ^testNotInPlace try { - R|/list|.R|/notInPlaceFilter|( = notInPlaceFilter@fun (it: R|kotlin/Boolean|): R|kotlin/Boolean| { + R|/list|.R|/notInPlaceFilter|( = notInPlaceFilter@fun (it: R|kotlin/Boolean|): R|kotlin/Boolean| { ^ R|/it| } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/topLevelResolve.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/topLevelResolve.fir.txt index 86055dc6e48..39904047f04 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/topLevelResolve.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/topLevelResolve.fir.txt @@ -19,24 +19,24 @@ FILE: topLevelResolve.kt ^id R|/arg| } public final fun testMap(): R|kotlin/Unit| { - lval first: R|kotlin/collections/List| = R|kotlin/collections/listOf|(vararg(Int(1), Int(2), Int(3))).R|kotlin/collections/map|( = map@fun (it: R|kotlin/Int|): R|kotlin/Int| { + lval first: R|kotlin/collections/List| = R|kotlin/collections/listOf|(vararg(Int(1), Int(2), Int(3))).R|kotlin/collections/map|( = map@fun (it: R|kotlin/Int|): R|kotlin/Int| { ^ R|/it|.R|kotlin/Int.times|(Int(2)) } ) - lval second: R|kotlin/collections/List| = R|kotlin/intArrayOf|(vararg(Int(4), Int(5), Int(6))).R|kotlin/collections/map|( = map@fun (it: R|kotlin/Int|): R|kotlin/Int| { + lval second: R|kotlin/collections/List| = R|kotlin/intArrayOf|(vararg(Int(4), Int(5), Int(6))).R|kotlin/collections/map|( = map@fun (it: R|kotlin/Int|): R|kotlin/Int| { ^ R|/it|.R|kotlin/Int.times|(Int(2)) } ) - lval withId: R|kotlin/collections/List| = R|kotlin/collections/listOf|(vararg(Int(1), Int(2), Int(3))).R|kotlin/collections/map|( = map@fun (it: R|kotlin/Int|): R|kotlin/Int| { + lval withId: R|kotlin/collections/List| = R|kotlin/collections/listOf|(vararg(Int(1), Int(2), Int(3))).R|kotlin/collections/map|( = map@fun (it: R|kotlin/Int|): R|kotlin/Int| { ^ R|/id|(R|/it|) } ) - lval stringToInt: R|kotlin/collections/List| = R|kotlin/collections/listOf|(vararg(String(alpha), String(omega))).R|kotlin/collections/map|( = map@fun (it: R|kotlin/String|): R|kotlin/Int| { + lval stringToInt: R|kotlin/collections/List| = R|kotlin/collections/listOf|(vararg(String(alpha), String(omega))).R|kotlin/collections/map|( = map@fun (it: R|kotlin/String|): R|kotlin/Int| { ^ R|/it|.R|kotlin/String.length| } ) - lval viaWith: R|kotlin/collections/List| = R|kotlin/with||, R|kotlin/collections/List|>(R|kotlin/collections/listOf|(Int(42)), = with@fun R|kotlin/collections/List|.(): R|kotlin/collections/List| { - ^ this@R|special/anonymous|.R|kotlin/collections/map|( = map@fun (it: R|kotlin/Int|): R|kotlin/Int| { + lval viaWith: R|kotlin/collections/List| = R|kotlin/with||, R|kotlin/collections/List|>(R|kotlin/collections/listOf|(Int(42)), = with@fun R|kotlin/collections/List|.(): R|kotlin/collections/List| { + ^ this@R|special/anonymous|.R|kotlin/collections/map|( = map@fun (it: R|kotlin/Int|): R|kotlin/Int| { ^ R|/it|.R|kotlin/Int.times|(R|/it|) } ) @@ -44,11 +44,11 @@ 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| { + lval length: R|kotlin/Int| = R|kotlin/with|(String(), = with@fun R|kotlin/String|.(): R|kotlin/Int| { ^ 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| { + lval indices: R|kotlin/ranges/IntRange| = R|kotlin/with|(String(), = with@fun R|kotlin/String|.(): R|kotlin/ranges/IntRange| { ^ this@R|special/anonymous|.R|kotlin/text/indices| } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/typeAliasWithForEach.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/typeAliasWithForEach.fir.txt index 25724df4b12..c078a00f462 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/typeAliasWithForEach.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/typeAliasWithForEach.fir.txt @@ -10,7 +10,7 @@ FILE: typeAliasWithForEach.kt public final typealias Arguments = R|kotlin/collections/Map| public final fun R|Arguments|.deepCopy(): R|Arguments| { lval result: R|java/util/HashMap, ft>| = R|java/util/HashMap.HashMap||, R|ft|>() - this@R|/deepCopy|.R|SubstitutionOverride|( = forEach@fun (key: R|ft|, value: R|ft|): R|kotlin/Unit| { + this@R|/deepCopy|.R|SubstitutionOverride|( = forEach@fun (key: R|ft|, value: R|ft|): R|kotlin/Unit| { R|/result|.R|kotlin/collections/set||, R|ft|>(R|/key|, R|/ArgsInfoImpl.ArgsInfoImpl|(R|/value|)) } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/whenAsLambdaReturnStatement.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/whenAsLambdaReturnStatement.fir.txt index 484e078397a..903620721bf 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/whenAsLambdaReturnStatement.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/whenAsLambdaReturnStatement.fir.txt @@ -12,7 +12,7 @@ FILE: whenAsLambdaReturnStatement.kt ^getInt Null(null) } public final fun test_1(modules: R|kotlin/collections/Collection|, b: R|kotlin/Boolean|): R|kotlin/Unit| { - lval res: R|kotlin/collections/Map>| = R|/modules|.R|kotlin/collections/groupBy|( = groupBy@fun (module: R|Module|): R|Module| { + lval res: R|kotlin/collections/Map>| = R|/modules|.R|kotlin/collections/groupBy|( = groupBy@fun (module: R|Module|): R|Module| { ^ when () { R|/b| -> { R|/module| @@ -26,7 +26,7 @@ FILE: whenAsLambdaReturnStatement.kt ) } public final fun test_2(): R|kotlin/Unit| { - lval x: R|kotlin/String| = R|kotlin/run|( = run@fun (): R|kotlin/String| { + lval x: R|kotlin/String| = R|kotlin/run|( = run@fun (): R|kotlin/String| { ^ try { String() } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/withInInitializer.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/withInInitializer.fir.txt index c12874a2167..4eb785a554e 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/withInInitializer.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/withInInitializer.fir.txt @@ -19,8 +19,8 @@ FILE: withInInitializer.kt public final val data: R|First| = R|/First.First|(Int(42)) public get(): R|First| - public final val test: R|kotlin/collections/List| = R|kotlin/with||>(this@R|/Second|.R|/Second.data|, = with@fun R|First|.(): R|kotlin/collections/List| { - ^ this@R|/Second|.R|/Second.list|.R|kotlin/collections/filterIsInstance|().R|kotlin/collections/filter|( = filter@fun (it: R|kotlin/Int|): R|kotlin/Boolean| { + public final val test: R|kotlin/collections/List| = R|kotlin/with||>(this@R|/Second|.R|/Second.data|, = with@fun R|First|.(): R|kotlin/collections/List| { + ^ this@R|/Second|.R|/Second.list|.R|kotlin/collections/filterIsInstance|().R|kotlin/collections/filter|( = filter@fun (it: R|kotlin/Int|): R|kotlin/Boolean| { ^ ==(R|/it|, this@R|special/anonymous|.R|/First.member|) } ) diff --git a/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/contracts/newSyntax/functionWithBothOldAndNewSyntaxContractDescription.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/contracts/newSyntax/functionWithBothOldAndNewSyntaxContractDescription.txt index 65033c2633b..0977aa5832c 100644 --- a/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/contracts/newSyntax/functionWithBothOldAndNewSyntaxContractDescription.txt +++ b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/contracts/newSyntax/functionWithBothOldAndNewSyntaxContractDescription.txt @@ -4,7 +4,7 @@ FILE: functionWithBothOldAndNewSyntaxContractDescription.kt returnsNotNull#() > { - contract#( = contract@fun .(): { + contract#( = contract@fun .(): { returns#().implies#(!=(s#, Null(null))) } ) diff --git a/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/contracts/oldSyntax/contractDescription.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/contracts/oldSyntax/contractDescription.txt index d1b521cdaaf..f843f89bbb8 100644 --- a/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/contracts/oldSyntax/contractDescription.txt +++ b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/contracts/oldSyntax/contractDescription.txt @@ -1,7 +1,7 @@ FILE: contractDescription.kt public? final? fun test_1(): R|kotlin/Unit| [Contract description] < - contract#( = contract@fun .(): { + contract#( = contract@fun .(): { callsInPlace#() } ) @@ -12,7 +12,7 @@ FILE: contractDescription.kt } public? final? fun test_2(): R|kotlin/Unit| [Contract description] < - kotlin#.contracts#.contract#( = contract@fun .(): { + kotlin#.contracts#.contract#( = contract@fun .(): { callsInPlace#() callsInPlace#() } @@ -25,7 +25,7 @@ FILE: contractDescription.kt public? final? var test_3: Int = IntegerLiteral(1) public? get(): Int [Contract description] < - contract#( = contract@fun .(): { + contract#( = contract@fun .(): { callsInPlace#() } ) @@ -36,7 +36,7 @@ FILE: contractDescription.kt } public? set(value: Int): R|kotlin/Unit| [Contract description] < - kotlin#.contracts#.contract#( = contract@fun .(): { + kotlin#.contracts#.contract#( = contract@fun .(): { callsInPlace#() callsInPlace#() } @@ -58,21 +58,21 @@ FILE: contractDescription.kt contract#() } public? final? fun test_6(): R|kotlin/Unit| { - aaa#.bbb#.ccc#.contract#( = contract@fun .(): { + aaa#.bbb#.ccc#.contract#( = contract@fun .(): { ^@contract Unit } ) test_6#() } public? final? fun test_7(): R|kotlin/Unit| { - contracts#.contract#( = contract@fun .(): { + contracts#.contract#( = contract@fun .(): { ^@contract Unit } ) test_7#() } public? final? fun test_8(): R|kotlin/Unit| { - aaa#.kotlin#.contracts#.contract#( = contract@fun .(): { + aaa#.kotlin#.contracts#.contract#( = contract@fun .(): { ^@contract Unit } ) diff --git a/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/delegates.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/delegates.txt index 0413d461605..70c17443e68 100644 --- a/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/delegates.txt +++ b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/delegates.txt @@ -1,5 +1,5 @@ FILE: delegates.kt - public? final? val x: Intby lazy#( = lazy@fun .(): { + public? final? val x: Intby lazy#( = lazy@fun .(): { IntegerLiteral(1).plus#(IntegerLiteral(2)) } ) diff --git a/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/labelForInfix.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/labelForInfix.txt index e4054a47a02..c70e54a5ca7 100644 --- a/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/labelForInfix.txt +++ b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/labelForInfix.txt @@ -1,9 +1,9 @@ FILE: labelForInfix.kt public? final? fun main(): R|kotlin/Unit| { - foo@fun .(): { + foo@fun .(): { length# } - .foo#(foo@fun .(): { + .foo#(foo@fun .(): { bar#() } ) diff --git a/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/lambda.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/lambda.txt index ca55cd8508c..b42fc2acc1a 100644 --- a/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/lambda.txt +++ b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/lambda.txt @@ -21,19 +21,19 @@ FILE: lambda.kt ^use f#(Tuple#(IntegerLiteral(1), IntegerLiteral(2))) } public? final? fun foo(): Int { - lval l1: = fun .(t: Tuple): { + lval l1: = fun .(t: Tuple): { lval x: = t#.x# lval y: = t#.y# x#.plus#(y#) } - use#( = use@fun .(: ): { + use#( = use@fun .(: ): { lval x: = R|/|.component1#() lval y: = R|/|.component2#() x#.plus#(y#) } ) - ^foo use#( = use@fun .(): { + ^foo use#( = use@fun .(): { when () { ==(it#.x#, IntegerLiteral(0)) -> { ^foo IntegerLiteral(0) @@ -45,7 +45,7 @@ FILE: lambda.kt ) } public? final? fun bar(): Int { - ^bar use#( = lambda@fun .(): { + ^bar use#( = lambda@fun .(): { when () { ==(it#.x#, IntegerLiteral(0)) -> { ^bar IntegerLiteral(0) @@ -58,20 +58,20 @@ FILE: lambda.kt } public? final? fun test(list: List): R|kotlin/Unit| { lval map: = mutableMapOf#() - list#.forEach#( = forEach@fun .(): { - +=(map#.getOrPut#(it#, getOrPut@fun .(): { + list#.forEach#( = forEach@fun .(): { + +=(map#.getOrPut#(it#, getOrPut@fun .(): { mutableListOf#() } ), String()) } ) } - public? final? val simple: = fun .(): { + public? final? val simple: = fun .(): { ^ Unit } public? get(): - public? final? val another: = fun .(): { + public? final? val another: = fun .(): { IntegerLiteral(42) } diff --git a/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/lambdaAndAnonymousFunction.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/lambdaAndAnonymousFunction.txt index 30f29648689..c537c63b82a 100644 --- a/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/lambdaAndAnonymousFunction.txt +++ b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/lambdaAndAnonymousFunction.txt @@ -3,17 +3,17 @@ FILE: lambdaAndAnonymousFunction.kt ^run block#() } public? final? fun test_1(): R|kotlin/Unit| { - run#( = run@fun .(): { + run#( = run@fun .(): { ^@run Unit } ) - run#( = run@fun .(): { + run#( = run@fun .(): { ^test_1 Unit } ) } public? final? fun test_2(): R|kotlin/Unit| { - run#(fun (): Int { + run#(fun (): Int { ^ IntegerLiteral(1) } ) diff --git a/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/locals.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/locals.txt index 631ca1b3588..248137b3959 100644 --- a/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/locals.txt +++ b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/locals.txt @@ -30,7 +30,7 @@ FILE: locals.kt } .foo#() - ^withLocals sum#(code#, Local#(IntegerLiteral(1)).diff#(), fun (x: Int, y: Int): { + ^withLocals sum#(code#, Local#(IntegerLiteral(1)).diff#(), fun (x: Int, y: Int): { ^ x#.plus#(y#) } ) diff --git a/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/these.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/these.txt index 97c982ba650..4fcb1071fe4 100644 --- a/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/these.txt +++ b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/these.txt @@ -26,7 +26,7 @@ FILE: these.kt ^extension this#.bar#() } public? final? fun test(some: Some): Int { - ^test with#(some#, = with@fun .(): { + ^test with#(some#, = with@fun .(): { this#.foo#().plus#(this@with#.extension#()) } ) diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirCallCompletionResultsWriterTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirCallCompletionResultsWriterTransformer.kt index 61a029e3a2d..c4863537ff7 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirCallCompletionResultsWriterTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirCallCompletionResultsWriterTransformer.kt @@ -25,6 +25,9 @@ import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.remapArguments import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.resultType import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.writeResultType import org.jetbrains.kotlin.fir.scopes.impl.FirIntegerOperatorCall +import org.jetbrains.kotlin.fir.symbols.AbstractFirBasedSymbol +import org.jetbrains.kotlin.fir.symbols.impl.FirConstructorSymbol +import org.jetbrains.kotlin.fir.symbols.impl.FirNamedFunctionSymbol import org.jetbrains.kotlin.fir.types.* import org.jetbrains.kotlin.fir.types.builder.buildErrorTypeRef import org.jetbrains.kotlin.fir.types.builder.buildResolvedTypeRef @@ -173,7 +176,21 @@ class FirCallCompletionResultsWriterTransformer( } else { subCandidate.handleVarargs() subCandidate.argumentMapping?.let { - result.replaceArgumentList(buildResolvedArgumentList(it)) + val newArgumentList = buildResolvedArgumentList(it) + val symbol = subCandidate.symbol + val functionIsInline = + (symbol as? FirNamedFunctionSymbol)?.fir?.isInline == true || symbol.isArrayConstructorWithLambda + for ((argument, parameter) in newArgumentList.mapping) { + val lambda = argument.unwrapArgument() as? FirAnonymousFunction ?: continue + val inlineStatus = when { + parameter.isCrossinline && functionIsInline -> InlineStatus.CrossInline + parameter.isNoinline -> InlineStatus.NoInline + functionIsInline -> InlineStatus.Inline + else -> InlineStatus.NoInline + } + lambda.replaceInlineStatus(inlineStatus) + } + result.replaceArgumentList(newArgumentList) } } result @@ -199,6 +216,13 @@ class FirCallCompletionResultsWriterTransformer( return result.compose() } + private val AbstractFirBasedSymbol<*>.isArrayConstructorWithLambda: Boolean + get() { + val constructor = (this as? FirConstructorSymbol)?.fir ?: return false + if (constructor.valueParameters.size != 2) return false + return constructor.returnTypeRef.coneType.isArrayOrPrimitiveArray + } + override fun transformAnnotationCall( annotationCall: FirAnnotationCall, data: ExpectedArgumentType? diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/types/ArrayUtils.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/types/ArrayUtils.kt index 757442b9144..05c32c26700 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/types/ArrayUtils.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/types/ArrayUtils.kt @@ -7,6 +7,9 @@ package org.jetbrains.kotlin.fir.types import org.jetbrains.kotlin.fir.symbols.StandardClassIds +val ConeKotlinType.isArrayOrPrimitiveArray: Boolean + get() = arrayElementType() != null + fun ConeKotlinType.createOutArrayType(nullable: Boolean = false): ConeKotlinType { return ConeKotlinTypeProjectionOut(this).createArrayType(nullable) } diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/FirAnonymousFunction.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/FirAnonymousFunction.kt index c9074ffa35c..a45216c5a10 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/FirAnonymousFunction.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/FirAnonymousFunction.kt @@ -38,6 +38,7 @@ abstract class FirAnonymousFunction : FirFunction, FirExpr abstract override val symbol: FirAnonymousFunctionSymbol abstract val label: FirLabel? abstract val invocationKind: EventOccurrencesRange? + abstract val inlineStatus: InlineStatus abstract val isLambda: Boolean abstract override val typeParameters: List @@ -59,6 +60,8 @@ abstract class FirAnonymousFunction : FirFunction, FirExpr abstract fun replaceInvocationKind(newInvocationKind: EventOccurrencesRange?) + abstract fun replaceInlineStatus(newInlineStatus: InlineStatus) + abstract override fun transformAnnotations(transformer: FirTransformer, data: D): FirAnonymousFunction abstract override fun transformReturnTypeRef(transformer: FirTransformer, data: D): FirAnonymousFunction diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirAnonymousFunctionBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirAnonymousFunctionBuilder.kt index cd44d448f9c..031afb5e3c5 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirAnonymousFunctionBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirAnonymousFunctionBuilder.kt @@ -18,6 +18,7 @@ import org.jetbrains.kotlin.fir.declarations.FirDeclarationOrigin import org.jetbrains.kotlin.fir.declarations.FirResolvePhase import org.jetbrains.kotlin.fir.declarations.FirTypeParameter import org.jetbrains.kotlin.fir.declarations.FirValueParameter +import org.jetbrains.kotlin.fir.declarations.InlineStatus import org.jetbrains.kotlin.fir.declarations.builder.FirFunctionBuilder import org.jetbrains.kotlin.fir.declarations.impl.FirAnonymousFunctionImpl import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall @@ -50,6 +51,7 @@ class FirAnonymousFunctionBuilder : FirFunctionBuilder, FirAnnotationContainerBu lateinit var symbol: FirAnonymousFunctionSymbol var label: FirLabel? = null var invocationKind: EventOccurrencesRange? = null + var inlineStatus: InlineStatus = InlineStatus.Unknown var isLambda: Boolean by kotlin.properties.Delegates.notNull() val typeParameters: MutableList = mutableListOf() @@ -69,6 +71,7 @@ class FirAnonymousFunctionBuilder : FirFunctionBuilder, FirAnnotationContainerBu symbol, label, invocationKind, + inlineStatus, isLambda, typeParameters, ) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/impl/FirAnonymousFunctionImpl.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/impl/FirAnonymousFunctionImpl.kt index 892910a0edc..1fa8b383782 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/impl/FirAnonymousFunctionImpl.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/impl/FirAnonymousFunctionImpl.kt @@ -15,6 +15,7 @@ import org.jetbrains.kotlin.fir.declarations.FirDeclarationOrigin import org.jetbrains.kotlin.fir.declarations.FirResolvePhase import org.jetbrains.kotlin.fir.declarations.FirTypeParameter import org.jetbrains.kotlin.fir.declarations.FirValueParameter +import org.jetbrains.kotlin.fir.declarations.InlineStatus import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall import org.jetbrains.kotlin.fir.expressions.FirBlock import org.jetbrains.kotlin.fir.references.FirControlFlowGraphReference @@ -42,6 +43,7 @@ internal class FirAnonymousFunctionImpl( override val symbol: FirAnonymousFunctionSymbol, override var label: FirLabel?, override var invocationKind: EventOccurrencesRange?, + override var inlineStatus: InlineStatus, override val isLambda: Boolean, override val typeParameters: MutableList, ) : FirAnonymousFunction() { @@ -138,4 +140,8 @@ internal class FirAnonymousFunctionImpl( override fun replaceInvocationKind(newInvocationKind: EventOccurrencesRange?) { invocationKind = newInvocationKind } + + override fun replaceInlineStatus(newInlineStatus: InlineStatus) { + inlineStatus = newInlineStatus + } } diff --git a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirRenderer.kt b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirRenderer.kt index aafa6fb08da..38b3b3a3df0 100644 --- a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirRenderer.kt +++ b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirRenderer.kt @@ -577,9 +577,11 @@ class FirRenderer(builder: StringBuilder, private val mode: RenderMode = RenderM anonymousFunction.valueParameters.renderParameters() print(": ") anonymousFunction.returnTypeRef.accept(this) + print(" ") + print(", kind=${anonymousFunction.invocationKind}") } + print("> ") if (mode.renderLambdaBodies) { anonymousFunction.body?.renderBody() } diff --git a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/declarations/InlineStatus.kt b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/declarations/InlineStatus.kt new file mode 100644 index 00000000000..d11891481af --- /dev/null +++ b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/declarations/InlineStatus.kt @@ -0,0 +1,13 @@ +/* + * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.fir.declarations + +enum class InlineStatus(val returnAllowed: Boolean) { + Inline(returnAllowed = true), // lambda will be inlined + NoInline(returnAllowed = false), // lambda won't be inlined (is part of not inline function call or marked with `noinline` modifier) + CrossInline(returnAllowed = false), // lambda will be inlined but marked with `crossinline` modifier + Unknown(returnAllowed = false), // inlinability of lambda is unknown +} diff --git a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/expressions/FirArgumentUtil.kt b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/expressions/FirArgumentUtil.kt index 56da9e6d206..e3863e9a344 100644 --- a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/expressions/FirArgumentUtil.kt +++ b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/expressions/FirArgumentUtil.kt @@ -24,7 +24,7 @@ fun buildBinaryArgumentList(left: FirExpression, right: FirExpression): FirArgum fun buildArraySetArgumentList(rValue: FirExpression, indexes: List): FirArgumentList = FirArraySetArgumentList(rValue, indexes) -fun buildResolvedArgumentList(mapping: LinkedHashMap): FirArgumentList = +fun buildResolvedArgumentList(mapping: LinkedHashMap): FirResolvedArgumentList = FirResolvedArgumentList(mapping) fun buildPartiallyResolvedArgumentList( diff --git a/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/BuilderConfigurator.kt b/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/BuilderConfigurator.kt index 9bf147a98e3..ce1e85360c7 100644 --- a/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/BuilderConfigurator.kt +++ b/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/BuilderConfigurator.kt @@ -208,6 +208,7 @@ object BuilderConfigurator : AbstractBuilderConfigurator(FirTree builder(anonymousFunction) { parents += functionBuilder defaultNull("invocationKind", "label", "body", "controlFlowGraphReference") + default("inlineStatus", "InlineStatus.Unknown") } builder(propertyAccessor) { diff --git a/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/NodeConfigurator.kt b/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/NodeConfigurator.kt index f27d25cc160..da051c1fc2f 100644 --- a/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/NodeConfigurator.kt +++ b/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/NodeConfigurator.kt @@ -282,6 +282,9 @@ object NodeConfigurator : AbstractFieldConfigurator(FirTreeBuild +field("invocationKind", eventOccurrencesRangeType, nullable = true, withReplace = true).apply { isMutable = true } + +field("inlineStatus", inlineStatusType, withReplace = true).apply { + isMutable = true + } +booleanField("isLambda") +typeParameters } diff --git a/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/Types.kt b/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/Types.kt index a619f80682d..2a3c9af96a4 100644 --- a/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/Types.kt +++ b/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/Types.kt @@ -26,6 +26,7 @@ val constKindType = type("types", "ConstantValueKind") val operationType = type("fir.expressions", "FirOperation") val classKindType = type(ClassKind::class) val eventOccurrencesRangeType = type(EventOccurrencesRange::class) +val inlineStatusType = type("fir.declarations", "InlineStatus") val varianceType = type(Variance::class) val nameType = type(Name::class) val visibilityType = type(Visibility::class) @@ -87,4 +88,4 @@ val annotationResolveStatusType = generatedType("expressions", "FirAnnotationRes val exhaustivenessStatusType = generatedType("expressions", "ExhaustivenessStatus") -val callableReferenceMappedArgumentsType = type("fir.resolve.calls", "CallableReferenceMappedArguments") \ No newline at end of file +val callableReferenceMappedArgumentsType = type("fir.resolve.calls", "CallableReferenceMappedArguments") diff --git a/compiler/testData/codegen/box/smartCasts/kt44814.dot b/compiler/testData/codegen/box/smartCasts/kt44814.dot index ef4fbb6fce4..99c5ec3dd73 100644 --- a/compiler/testData/codegen/box/smartCasts/kt44814.dot +++ b/compiler/testData/codegen/box/smartCasts/kt44814.dot @@ -811,13 +811,13 @@ digraph kt44814_kt { Null(null) } ($subj$ is R|FirPsiSourceElement|) -> { - (this@R|/FirModifierList.Companion.getModifierList|.R|/FirPsiSourceElement.psi| as? R|KtModifierListOwner|)?.{ $subj$.R|/KtModifierListOwner.modifierList| }?.{ $subj$.R|kotlin/let|( = let@fun (it: R|KtModifierList|): R|FirModifierList.FirPsiModifierList| { + (this@R|/FirModifierList.Companion.getModifierList|.R|/FirPsiSourceElement.psi| as? R|KtModifierListOwner|)?.{ $subj$.R|/KtModifierListOwner.modifierList| }?.{ $subj$.R|kotlin/let|( = let@fun (it: R|KtModifierList|): R|FirModifierList.FirPsiModifierList| { ^ R|/FirModifierList.FirPsiModifierList.FirPsiModifierList|(R|/it|) } ) } } ($subj$ is R|FirLightSourceElement|) -> { - lval modifierListNode: R|LighterASTNode| = this@R|/FirModifierList.Companion.getModifierList|.R|/FirLightSourceElement.lighterASTNode|.R|/LighterASTNode.getChildren|(this@R|/FirModifierList.Companion.getModifierList|.R|/FirLightSourceElement.treeStructure|).R|kotlin/collections/find|( = find@fun (it: R|LighterASTNode?|): R|kotlin/Boolean| { + lval modifierListNode: R|LighterASTNode| = this@R|/FirModifierList.Companion.getModifierList|.R|/FirLightSourceElement.lighterASTNode|.R|/LighterASTNode.getChildren|(this@R|/FirModifierList.Companion.getModifierList|.R|/FirLightSourceElement.treeStructure|).R|kotlin/collections/find|( = find@fun (it: R|LighterASTNode?|): R|kotlin/Boolean| { ^ ==(R|/it|?.{ $subj$.R|/LighterASTNode.tokenType| }, Q|TokenType|.R|/TokenType.Companion.MODIFIER_LIST|) } ) ?: ^getModifierList Null(null) diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/innerDeclarationsResolve/class.fir.txt b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/innerDeclarationsResolve/class.fir.txt index 9fd96710e0f..2a16da668d0 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/innerDeclarationsResolve/class.fir.txt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/innerDeclarationsResolve/class.fir.txt @@ -11,7 +11,7 @@ FILE: class.kt [BODY_RESOLVE] private get(): R|ERROR CLASS: Symbol not found for C| public final [BODY_RESOLVE] fun foo([BODY_RESOLVE] a: ): { - ^foo #(R|/a|, = [BODY_RESOLVE] with@fun (): R|ERROR CLASS: Unresolved name: bar| { + ^foo #(R|/a|, = [BODY_RESOLVE] with@fun (): R|ERROR CLASS: Unresolved name: bar| { ^ #(String(a), this@R|/B|.R|/B.y|) } ) diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/innerDeclarationsResolve/lambdaInImplicitFunBody.fir.txt b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/innerDeclarationsResolve/lambdaInImplicitFunBody.fir.txt index 2a096f77245..8e0d2d8d32c 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/innerDeclarationsResolve/lambdaInImplicitFunBody.fir.txt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/innerDeclarationsResolve/lambdaInImplicitFunBody.fir.txt @@ -11,8 +11,8 @@ FILE: lambdaInImplicitFunBody.kt } public final [BODY_RESOLVE] fun foo([BODY_RESOLVE] a: R|kotlin/Int|): R|kotlin/String| { - ^foo R|/with|(R|/a|, = [BODY_RESOLVE] with@fun R|kotlin/Int|.(): R|kotlin/String| { - ^ this@R|special/anonymous|.R|kotlin/Any.toString|().R|/let|( = [BODY_RESOLVE] let@fun ([BODY_RESOLVE] it: R|kotlin/String|): R|kotlin/String| { + ^foo R|/with|(R|/a|, = [BODY_RESOLVE] with@fun R|kotlin/Int|.(): R|kotlin/String| { + ^ this@R|special/anonymous|.R|kotlin/Any.toString|().R|/let|( = [BODY_RESOLVE] let@fun ([BODY_RESOLVE] it: R|kotlin/String|): R|kotlin/String| { ^ R|/it| } ) diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/innerDeclarationsResolve/lambdaInImplicitPropertyBody.fir.txt b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/innerDeclarationsResolve/lambdaInImplicitPropertyBody.fir.txt index 57a44d22288..c274fef76d6 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/innerDeclarationsResolve/lambdaInImplicitPropertyBody.fir.txt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/innerDeclarationsResolve/lambdaInImplicitPropertyBody.fir.txt @@ -13,8 +13,8 @@ FILE: lambdaInImplicitPropertyBody.kt public final [BODY_RESOLVE] val a: R|kotlin/Int| = Int(10) [BODY_RESOLVE] public get(): R|kotlin/Int| - public final [BODY_RESOLVE] val x: R|kotlin/String| = R|/with|(this@R|/B|.R|/B.a|, = [BODY_RESOLVE] with@fun R|kotlin/Int|.(): R|kotlin/String| { - ^ this@R|special/anonymous|.R|kotlin/Any.toString|().R|/let|( = [BODY_RESOLVE] let@fun ([BODY_RESOLVE] it: R|kotlin/String|): R|kotlin/String| { + public final [BODY_RESOLVE] val x: R|kotlin/String| = R|/with|(this@R|/B|.R|/B.a|, = [BODY_RESOLVE] with@fun R|kotlin/Int|.(): R|kotlin/String| { + ^ this@R|special/anonymous|.R|kotlin/Any.toString|().R|/let|( = [BODY_RESOLVE] let@fun ([BODY_RESOLVE] it: R|kotlin/String|): R|kotlin/String| { ^ R|/it| } ) diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/innerDeclarationsResolve/lambdasInWithBodyFunction.fir.txt b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/innerDeclarationsResolve/lambdasInWithBodyFunction.fir.txt index 7f801170a24..d3ae574457b 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/innerDeclarationsResolve/lambdasInWithBodyFunction.fir.txt +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/testdata/innerDeclarationsResolve/lambdasInWithBodyFunction.fir.txt @@ -11,13 +11,13 @@ FILE: lambdasInWithBodyFunction.kt } public final [BODY_RESOLVE] fun foo(): R|kotlin/Unit| { - [BODY_RESOLVE] lval a: R|kotlin/Int| = R|/with|(Int(1), = [BODY_RESOLVE] with@fun R|kotlin/Int|.(): R|kotlin/Int| { - ^ this@R|special/anonymous|.R|/let|( = [BODY_RESOLVE] let@fun ([BODY_RESOLVE] it: R|kotlin/Int|): R|kotlin/Int| { + [BODY_RESOLVE] lval a: R|kotlin/Int| = R|/with|(Int(1), = [BODY_RESOLVE] with@fun R|kotlin/Int|.(): R|kotlin/Int| { + ^ this@R|special/anonymous|.R|/let|( = [BODY_RESOLVE] let@fun ([BODY_RESOLVE] it: R|kotlin/Int|): R|kotlin/Int| { ^ R|/it| } ) } - ).R|/let|( = [BODY_RESOLVE] let@fun ([BODY_RESOLVE] it: R|kotlin/Int|): R|kotlin/Int| { + ).R|/let|( = [BODY_RESOLVE] let@fun ([BODY_RESOLVE] it: R|kotlin/Int|): R|kotlin/Int| { ^ Int(2) } )