diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt index 067ab1eaa6c..6cea315dc70 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrVisitor.kt @@ -12,18 +12,14 @@ import org.jetbrains.kotlin.fir.declarations.impl.FirDefaultPropertyGetter import org.jetbrains.kotlin.fir.declarations.impl.FirDefaultPropertySetter import org.jetbrains.kotlin.fir.descriptors.FirModuleDescriptor import org.jetbrains.kotlin.fir.expressions.* -import org.jetbrains.kotlin.fir.expressions.impl.FirElseIfTrueCondition -import org.jetbrains.kotlin.fir.expressions.impl.FirNoReceiverExpression -import org.jetbrains.kotlin.fir.expressions.impl.FirUnitExpression +import org.jetbrains.kotlin.fir.expressions.impl.* import org.jetbrains.kotlin.fir.references.FirReference import org.jetbrains.kotlin.fir.references.FirResolvedNamedReference import org.jetbrains.kotlin.fir.references.FirSuperReference import org.jetbrains.kotlin.fir.references.impl.FirPropertyFromParameterResolvedNamedReference -import org.jetbrains.kotlin.fir.resolve.ScopeSession -import org.jetbrains.kotlin.fir.resolve.buildUseSiteMemberScope +import org.jetbrains.kotlin.fir.references.impl.FirResolvedNamedReferenceImpl +import org.jetbrains.kotlin.fir.resolve.* import org.jetbrains.kotlin.fir.resolve.calls.SyntheticPropertySymbol -import org.jetbrains.kotlin.fir.resolve.firSymbolProvider -import org.jetbrains.kotlin.fir.resolve.toSymbol import org.jetbrains.kotlin.fir.resolve.transformers.IntegerLiteralTypeApproximationTransformer import org.jetbrains.kotlin.fir.scopes.impl.FirClassSubstitutionScope import org.jetbrains.kotlin.fir.scopes.impl.FirIntegerOperator @@ -485,8 +481,8 @@ class Fir2IrVisitor( } } - override fun visitAnonymousFunction(anonymousFunction: FirAnonymousFunction, data: Any?): IrElement = - anonymousFunction.convertWithOffsets { startOffset, endOffset -> + override fun visitAnonymousFunction(anonymousFunction: FirAnonymousFunction, data: Any?): IrElement { + return anonymousFunction.convertWithOffsets { startOffset, endOffset -> val irFunction = declarationStorage.getIrLocalFunction(anonymousFunction) irFunction.setParentByParentStack().withFunction { setFunctionContent(irFunction.descriptor, anonymousFunction) @@ -496,6 +492,7 @@ class Fir2IrVisitor( IrFunctionExpressionImpl(startOffset, endOffset, type, irFunction, IrStatementOrigin.LAMBDA) } + } private fun IrValueParameter.setDefaultValue(firValueParameter: FirValueParameter) { val firDefaultValue = firValueParameter.defaultValue @@ -708,6 +705,7 @@ class Fir2IrVisitor( is FirPropertyFromParameterResolvedNamedReference -> IrStatementOrigin.INITIALIZE_PROPERTY_FROM_PARAMETER is FirResolvedNamedReference -> when (resolvedSymbol) { is AccessorSymbol, is SyntheticPropertySymbol -> IrStatementOrigin.GET_PROPERTY + is FirNamedFunctionSymbol -> if (resolvedSymbol.callableId.isInvoke()) IrStatementOrigin.INVOKE else null else -> null } else -> null @@ -893,12 +891,30 @@ class Fir2IrVisitor( val convertibleCall = if (functionCall.toResolvedCallableSymbol()?.fir is FirIntegerOperator) { functionCall.copy().transformSingle(integerApproximator, null) } else { - functionCall + checkIfInvoke(functionCall) } return convertibleCall.toIrExpression(convertibleCall.typeRef) .applyCallArguments(convertibleCall).applyTypeArguments(convertibleCall).applyReceivers(convertibleCall) } + // Use the generic invoke method in Function classes, to match bridges generated by the backend. + private fun checkIfInvoke(functionCall: FirFunctionCall): FirFunctionCall { + if (functionCall !is FirFunctionCallImpl) { + return functionCall + } + val calleeReference = (functionCall.calleeReference as? FirResolvedNamedReferenceImpl) ?: return functionCall + val resolvedSymbol = (calleeReference.resolvedSymbol as? FirNamedFunctionSymbol) ?: return functionCall + if (resolvedSymbol.callableId.isInvoke()) { + functionCall.calleeReference = + FirResolvedNamedReferenceImpl( + source = calleeReference.source, + name = calleeReference.name, + resolvedSymbol = resolvedSymbol.overriddenSymbol!! + ) + } + return functionCall + } + override fun visitAnnotationCall(annotationCall: FirAnnotationCall, data: Any?): IrElement { return annotationCall.toIrExpression().applyCallArguments(annotationCall) } diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/ResolveUtils.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/ResolveUtils.kt index abfe8bef1d1..980de85fb19 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/ResolveUtils.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/ResolveUtils.kt @@ -5,6 +5,7 @@ package org.jetbrains.kotlin.fir.resolve +import org.jetbrains.kotlin.builtins.KotlinBuiltIns import org.jetbrains.kotlin.descriptors.ClassKind import org.jetbrains.kotlin.fir.* import org.jetbrains.kotlin.fir.declarations.* @@ -438,3 +439,8 @@ fun BodyResolveComponents.transformQualifiedAccessUsingSmartcastInfo(qualifiedAc } return FirExpressionWithSmartcastImpl(qualifiedAccessExpression, intersectedTypeRef, typesFromSmartCast) } + +fun CallableId.isInvoke() = + packageName == KotlinBuiltIns.BUILT_INS_PACKAGE_FQ_NAME + && className?.asString()?.startsWith("Function") == true + && callableName.asString() == "invoke" diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirDeclarationsResolveTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirDeclarationsResolveTransformer.kt index 257ee59c4d3..44a3738864c 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirDeclarationsResolveTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirDeclarationsResolveTransformer.kt @@ -6,6 +6,7 @@ package org.jetbrains.kotlin.fir.resolve.transformers.body.resolve import org.jetbrains.kotlin.fir.FirElement +import org.jetbrains.kotlin.fir.FirFunctionTarget import org.jetbrains.kotlin.fir.copy import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.declarations.impl.FirDefaultPropertyAccessor @@ -13,7 +14,10 @@ import org.jetbrains.kotlin.fir.declarations.impl.FirValueParameterImpl import org.jetbrains.kotlin.fir.diagnostics.DiagnosticKind import org.jetbrains.kotlin.fir.diagnostics.FirSimpleDiagnostic import org.jetbrains.kotlin.fir.expressions.FirExpression +import org.jetbrains.kotlin.fir.expressions.FirReturnExpression import org.jetbrains.kotlin.fir.expressions.FirStatement +import org.jetbrains.kotlin.fir.expressions.impl.FirReturnExpressionImpl +import org.jetbrains.kotlin.fir.expressions.impl.FirUnitExpression import org.jetbrains.kotlin.fir.resolve.* import org.jetbrains.kotlin.fir.resolve.calls.* import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutor @@ -27,10 +31,7 @@ import org.jetbrains.kotlin.fir.types.* import org.jetbrains.kotlin.fir.types.impl.FirErrorTypeRefImpl import org.jetbrains.kotlin.fir.types.impl.FirImplicitTypeRefImpl import org.jetbrains.kotlin.fir.types.impl.FirResolvedTypeRefImpl -import org.jetbrains.kotlin.fir.visitors.CompositeTransformResult -import org.jetbrains.kotlin.fir.visitors.FirTransformer -import org.jetbrains.kotlin.fir.visitors.compose -import org.jetbrains.kotlin.fir.visitors.transformSingle +import org.jetbrains.kotlin.fir.visitors.* import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.utils.addIfNotNull @@ -406,10 +407,10 @@ class FirDeclarationsResolveTransformer(transformer: FirBodyResolveTransformer) return when (data) { ResolutionMode.ContextDependent -> { dataFlowAnalyzer.visitPostponedAnonymousFunction(anonymousFunction) - anonymousFunction.compose() + anonymousFunction.addReturn().compose() } is ResolutionMode.LambdaResolution -> { - transformAnonymousFunctionWithLambdaResolution(anonymousFunction, data).compose() + transformAnonymousFunctionWithLambdaResolution(anonymousFunction, data).addReturn().compose() } is ResolutionMode.WithExpectedType, is ResolutionMode.ContextIndependent -> { val expectedTypeRef = (data as? ResolutionMode.WithExpectedType)?.expectedTypeRef ?: FirImplicitTypeRefImpl(null) @@ -484,7 +485,7 @@ class FirDeclarationsResolveTransformer(transformer: FirBodyResolveTransformer) val returnTypes = dataFlowAnalyzer.returnExpressionsOfAnonymousFunction(af).mapNotNull { (it as? FirExpression)?.resultType?.coneTypeUnsafe() } af.replaceReturnTypeRef(af.returnTypeRef.resolvedTypeFromPrototype(inferenceComponents.ctx.commonSuperTypeOrNull(returnTypes) ?: session.builtinTypes.unitType.coneTypeUnsafe())) af.replaceTypeRef(af.constructFunctionalTypeRef(session)) - af.compose() + af.addReturn().compose() } is ResolutionMode.WithStatus -> { throw AssertionError("Should not be here in WithStatus mode") @@ -492,6 +493,36 @@ class FirDeclarationsResolveTransformer(transformer: FirBodyResolveTransformer) } } + private fun FirAnonymousFunction.addReturn(): FirAnonymousFunction { + val lastStatement = body?.statements?.lastOrNull() + val returnType = (body?.typeRef as? FirResolvedTypeRef) ?: return this + val returnNothing = returnType.isNothing || returnType.isUnit + if (lastStatement is FirExpression && !returnNothing) { + body?.transformChildren( + object : FirDefaultTransformer() { + override fun transformElement(element: E, data: FirExpression): CompositeTransformResult { + if (element == lastStatement) { + val returnExpression = FirReturnExpressionImpl(element.source, lastStatement) + returnExpression.target = FirFunctionTarget(null) + (returnExpression.target as FirFunctionTarget).bind(this@addReturn) + return (returnExpression as E).compose() + } + return element.compose() + } + + override fun transformReturnExpression( + returnExpression: FirReturnExpression, + data: FirExpression + ): CompositeTransformResult { + return returnExpression.compose() + } + }, + FirUnitExpression(null) + ) + } + return this + } + private inline fun withLabelAndReceiverType( labelName: Name?, owner: FirDeclaration, diff --git a/compiler/fir/resolve/testData/resolve/arguments/incorrectFunctionalType.txt b/compiler/fir/resolve/testData/resolve/arguments/incorrectFunctionalType.txt index a3148f5315d..c0375a9744e 100644 --- a/compiler/fir/resolve/testData/resolve/arguments/incorrectFunctionalType.txt +++ b/compiler/fir/resolve/testData/resolve/arguments/incorrectFunctionalType.txt @@ -3,7 +3,7 @@ FILE: incorrectFunctionalType.kt } public final fun test(): R|kotlin/Unit| { R|/foo|( = foo@fun R|kotlin/Int|.(it: R|kotlin/Int|): R|kotlin/Int| { - this@R|special/anonymous|.R|kotlin/Int.plus|(R|/it|) + ^ this@R|special/anonymous|.R|kotlin/Int.plus|(R|/it|) } ) } diff --git a/compiler/fir/resolve/testData/resolve/arguments/integerLiteralTypes.txt b/compiler/fir/resolve/testData/resolve/arguments/integerLiteralTypes.txt index 8c8d83c494e..93573efd765 100644 --- a/compiler/fir/resolve/testData/resolve/arguments/integerLiteralTypes.txt +++ b/compiler/fir/resolve/testData/resolve/arguments/integerLiteralTypes.txt @@ -26,29 +26,29 @@ FILE: integerLiteralTypes.kt } public final fun test_3(): R|kotlin/Unit| { R|/takeInt|(R|kotlin/run|( = run@fun (): R|kotlin/Int| { - Int(1) + ^ Int(1) } )) R|/takeByte|(R|kotlin/run|( = run@fun (): R|kotlin/Byte| { - Int(1) + ^ Int(1) } )) R|/takeLong|(R|kotlin/run|( = run@fun (): R|kotlin/Long| { - Int(1) + ^ Int(1) } )) } public final fun test_4(): R|kotlin/Unit| { R|/takeAny|(Int(1)) R|/takeAny|(R|kotlin/run|( = run@fun (): R|kotlin/Int| { - Int(1) + ^ Int(1) } )) } public final fun test_5(): R|kotlin/Unit| { #(Int(1)) #(R|kotlin/run|( = run@fun (): R|kotlin/Int| { - Int(1) + ^ Int(1) } )) } diff --git a/compiler/fir/resolve/testData/resolve/arguments/lambdaInLambda.txt b/compiler/fir/resolve/testData/resolve/arguments/lambdaInLambda.txt index dc0aec8e42f..7fbfedd97e2 100644 --- a/compiler/fir/resolve/testData/resolve/arguments/lambdaInLambda.txt +++ b/compiler/fir/resolve/testData/resolve/arguments/lambdaInLambda.txt @@ -27,7 +27,7 @@ FILE: lambdaInLambda.kt 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|?.R|kotlin/let|( = let@fun (it: R|kotlin/Int|): R|kotlin/Unit| { + ^ R|/ordinal|?.R|kotlin/let|( = let@fun (it: R|kotlin/Int|): R|kotlin/Unit| { Unit } ) diff --git a/compiler/fir/resolve/testData/resolve/arguments/lambdaInLambda2.txt b/compiler/fir/resolve/testData/resolve/arguments/lambdaInLambda2.txt index 91f264912d5..6aee71ec3f7 100644 --- a/compiler/fir/resolve/testData/resolve/arguments/lambdaInLambda2.txt +++ b/compiler/fir/resolve/testData/resolve/arguments/lambdaInLambda2.txt @@ -8,7 +8,7 @@ FILE: main.kt } public final fun test(): R|kotlin/Unit| { lval processor: = #(R|/Function|( = Function@fun (method: R|PsiMethod?|): R|PsiClass?| { - R|/method|?.R|/PsiMethod.containingClass| + ^ R|/method|?.R|/PsiMethod.containingClass| } )) } diff --git a/compiler/fir/resolve/testData/resolve/arguments/lambdaInUnresolvedCall.txt b/compiler/fir/resolve/testData/resolve/arguments/lambdaInUnresolvedCall.txt index 92f5c9d2b31..1e32a1a1a30 100644 --- a/compiler/fir/resolve/testData/resolve/arguments/lambdaInUnresolvedCall.txt +++ b/compiler/fir/resolve/testData/resolve/arguments/lambdaInUnresolvedCall.txt @@ -5,13 +5,13 @@ FILE: lambdaInUnresolvedCall.kt public final fun test_1(): R|kotlin/Unit| { #( = myRun@fun (): R|kotlin/Int| { lval x: R|kotlin/Int| = Int(1) - R|/x|.R|kotlin/Int.times|(Int(2)) + ^ R|/x|.R|kotlin/Int.times|(Int(2)) } ) } public final fun test_2(): R|kotlin/Unit| { #( = myRun@fun (): R|kotlin/Any?| { - R|/materialize|() + ^ R|/materialize|() } ) } diff --git a/compiler/fir/resolve/testData/resolve/arguments/operatorsOverLiterals.kt b/compiler/fir/resolve/testData/resolve/arguments/operatorsOverLiterals.kt index b8e51b8eaff..3c9920026f5 100644 --- a/compiler/fir/resolve/testData/resolve/arguments/operatorsOverLiterals.kt +++ b/compiler/fir/resolve/testData/resolve/arguments/operatorsOverLiterals.kt @@ -56,7 +56,7 @@ fun test_5() { fun test_6() { takeByte(run { 127 + 1 }) - takeByte(1 + run { 1 }) + takeByte(1 + run { 1 }) takeByte(run { 1 + 1 }) 1 + 1 run { 1 } diff --git a/compiler/fir/resolve/testData/resolve/arguments/operatorsOverLiterals.txt b/compiler/fir/resolve/testData/resolve/arguments/operatorsOverLiterals.txt index c02587b777d..ea1bfcf2dee 100644 --- a/compiler/fir/resolve/testData/resolve/arguments/operatorsOverLiterals.txt +++ b/compiler/fir/resolve/testData/resolve/arguments/operatorsOverLiterals.txt @@ -52,24 +52,24 @@ FILE: operatorsOverLiterals.kt } public final fun test_6(): R|kotlin/Unit| { #(R|kotlin/run|( = run@fun (): R|kotlin/Int| { - Int(127).R|kotlin/Int.plus|(Int(1)) + ^ Int(127).R|kotlin/Int.plus|(Int(1)) } )) - #(Int(1).#(R|kotlin/run|( = run@fun (): R|kotlin/Int| { - Int(1) + #(Int(1).R|/plus|(R|kotlin/run|( = run@fun (): R|kotlin/Int| { + ^ Int(1) } ))) R|/takeByte|(R|kotlin/run|( = run@fun (): R|kotlin/Byte| { - Int(1).R|kotlin/Int.plus|(Int(1)) + ^ Int(1).R|kotlin/Int.plus|(Int(1)) } )) Int(1).R|kotlin/Int.plus|(Int(1)) R|kotlin/run|( = run@fun (): R|kotlin/Int| { - Int(1) + ^ Int(1) } ) Int(1).R|/plus|(R|kotlin/run|( = run@fun (): R|kotlin/Int| { - Int(1) + ^ Int(1) } )) } diff --git a/compiler/fir/resolve/testData/resolve/arguments/overloadWithDefault.txt b/compiler/fir/resolve/testData/resolve/arguments/overloadWithDefault.txt index 2dc8330d1fd..a78ab354c67 100644 --- a/compiler/fir/resolve/testData/resolve/arguments/overloadWithDefault.txt +++ b/compiler/fir/resolve/testData/resolve/arguments/overloadWithDefault.txt @@ -7,7 +7,7 @@ FILE: overloadWithDefault.kt } public final fun test(a: R|A|): R|kotlin/Unit| { R|/a|.R|/A.foo|( = foo@fun (): R|kotlin/Boolean| { - Boolean(true) + ^ Boolean(true) } ) } diff --git a/compiler/fir/resolve/testData/resolve/cast.txt b/compiler/fir/resolve/testData/resolve/cast.txt index a8c76db9abc..16ccfb6f2bb 100644 --- a/compiler/fir/resolve/testData/resolve/cast.txt +++ b/compiler/fir/resolve/testData/resolve/cast.txt @@ -14,12 +14,12 @@ FILE: cast.kt public get(): R|() -> kotlin/Unit| public final val h: R|(kotlin/String) -> kotlin/Boolean| = fun (_: R|kotlin/String|): R|kotlin/Boolean| { - Boolean(false) + ^ 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| { - Boolean(true) + ^ Boolean(true) } public get(): R|(ERROR CLASS: No type for parameter) -> kotlin/Boolean| diff --git a/compiler/fir/resolve/testData/resolve/cfg/complex.dot b/compiler/fir/resolve/testData/resolve/cfg/complex.dot index 9872468f477..edc72546f1b 100644 --- a/compiler/fir/resolve/testData/resolve/cfg/complex.dot +++ b/compiler/fir/resolve/testData/resolve/cfg/complex.dot @@ -31,7 +31,7 @@ digraph complex_kt { 17 [label="Postponed enter to lambda"]; 18 [label="Postponed exit from lambda"]; 19 [label="Function call: #.#(R|/url|).#( = connect@fun (): R|ERROR CLASS: Unresolved name: fromJson| { - #().#().#(#.#.#(), (Q|kotlin/Array|).R|kotlin/jvm/java|) + ^ #().#().#(#.#.#(), (Q|kotlin/Array|).R|kotlin/jvm/java|) } )"]; 20 [label="Exit block"]; diff --git a/compiler/fir/resolve/testData/resolve/cfg/complex.txt b/compiler/fir/resolve/testData/resolve/cfg/complex.txt index b145552c17e..696d744c418 100644 --- a/compiler/fir/resolve/testData/resolve/cfg/complex.txt +++ b/compiler/fir/resolve/testData/resolve/cfg/complex.txt @@ -3,7 +3,7 @@ FILE: complex.kt lval url: R|kotlin/String| = (String(https://plugins.jetbrains.com/api/plugins/), R|/pluginId|.#.R|kotlin/toString|(), String(/updates?version=), R|/version|.R|kotlin/Any.toString|()) lval pluginDTOs: R|kotlin/Array| = try { #.#(R|/url|).#( = connect@fun (): R|ERROR CLASS: Unresolved name: fromJson| { - #().#().#(#.#.#(), (Q|kotlin/Array|).R|kotlin/jvm/java|) + ^ #().#().#(#.#.#(), (Q|kotlin/Array|).R|kotlin/jvm/java|) } ) } diff --git a/compiler/fir/resolve/testData/resolve/cfg/initBlockAndInPlaceLambda.txt b/compiler/fir/resolve/testData/resolve/cfg/initBlockAndInPlaceLambda.txt index 449ede36410..4917523019e 100644 --- a/compiler/fir/resolve/testData/resolve/cfg/initBlockAndInPlaceLambda.txt +++ b/compiler/fir/resolve/testData/resolve/cfg/initBlockAndInPlaceLambda.txt @@ -13,7 +13,7 @@ FILE: initBlockAndInPlaceLambda.kt init { lval c: R|C?| = R|/a|.R|/A.b|?.R|kotlin/let|( = let@fun (it: R|B|): R|C| { - R|/C.C|(R|/a|, R|/it|) + ^ R|/C.C|(R|/a|, R|/it|) } ) } diff --git a/compiler/fir/resolve/testData/resolve/cfg/lambdas.dot b/compiler/fir/resolve/testData/resolve/cfg/lambdas.dot index 0179cce32b3..60ea7bda1b8 100644 --- a/compiler/fir/resolve/testData/resolve/cfg/lambdas.dot +++ b/compiler/fir/resolve/testData/resolve/cfg/lambdas.dot @@ -41,7 +41,7 @@ digraph lambdas_kt { } 17 [label="Postponed exit from lambda"]; 18 [label="Function call: R|/run|( = run@fun (): R|kotlin/Unit| { - R|/x|.R|kotlin/Int.inc|() + ^ R|/x|.R|kotlin/Int.inc|() } )"]; 19 [label="Exit block"]; diff --git a/compiler/fir/resolve/testData/resolve/cfg/lambdas.txt b/compiler/fir/resolve/testData/resolve/cfg/lambdas.txt index 24fa31028c0..bd3cd9f3f3a 100644 --- a/compiler/fir/resolve/testData/resolve/cfg/lambdas.txt +++ b/compiler/fir/resolve/testData/resolve/cfg/lambdas.txt @@ -6,7 +6,7 @@ FILE: lambdas.kt when () { (R|/x| is R|kotlin/Int|) -> { R|/run|( = run@fun (): R|kotlin/Unit| { - R|/x|.R|kotlin/Int.inc|() + ^ R|/x|.R|kotlin/Int.inc|() } ) } @@ -17,7 +17,7 @@ FILE: lambdas.kt when () { (R|/x| is R|kotlin/Int|) -> { lval lambda: R|() -> kotlin/Int| = fun (): R|kotlin/Int| { - R|/x|.R|kotlin/Int.inc|() + ^ R|/x|.R|kotlin/Int.inc|() } } diff --git a/compiler/fir/resolve/testData/resolve/cfg/loops.cfg.txt b/compiler/fir/resolve/testData/resolve/cfg/loops.cfg.txt deleted file mode 100644 index b6adb057b90..00000000000 --- a/compiler/fir/resolve/testData/resolve/cfg/loops.cfg.txt +++ /dev/null @@ -1,68 +0,0 @@ - 0: Enter function "testWhile" -> 1 - 1: Enter block -> 2 | <- 0 - 2: Enter while loop -> 3 | <- 1 - 3: Enter loop condition -> 4 | <- 2, 12 - 4: Access variable R|/b| -> 5 | <- 3 - 5: Exit loop condition -> 6, 13 | <- 4 - 6: Enter loop block -> 7 | <- 5 - 7: Enter block -> 8 | <- 6 - 8: Access variable R|/x| -> 9 | <- 7 - 9: Type operator: "x is String" -> 10 | <- 8 -10: Variable declaration: lval y: R|kotlin/Boolean| -> 11 | <- 9 -11: Exit block -> 12 | <- 10 -12: Exit loop block -> 3 | <- 11 -13: Exit whileloop -> 14 | <- 5 -14: Access variable R|/x| -> 15 | <- 13 -15: Type operator: "x is String" -> 16 | <- 14 -16: Exit block -> 17 | <- 15 -17: Exit function "testWhile" -> | <- 16 - - 0: Enter function "testDoWhile" -> 1 - 1: Enter block -> 2 | <- 0 - 2: Enter do-while loop -> 3 | <- 1 - 3: Enter loop block -> 4 | <- 2, 12 - 4: Enter block -> 5 | <- 3 - 5: Access variable R|/x| -> 6 | <- 4 - 6: Type operator: "x is String" -> 7 | <- 5 - 7: Variable declaration: lval y: R|kotlin/Boolean| -> 8 | <- 6 - 8: Exit block -> 9 | <- 7 - 9: Exit loop block -> 10 | <- 8 -10: Enter loop condition -> 11 | <- 9 -11: Access variable R|/b| -> 12 | <- 10 -12: Exit loop condition -> 3, 13 | <- 11 -13: Exit do-whileloop -> 14 | <- 12 -14: Access variable R|/x| -> 15 | <- 13 -15: Type operator: "x is String" -> 16 | <- 14 -16: Exit block -> 17 | <- 15 -17: Exit function "testDoWhile" -> | <- 16 - - 0: Enter function "testFor" -> 1 - 1: Enter block -> 2 | <- 0 - 2: Const: Int(0) -> 3 | <- 1 - 3: Const: Int(5) -> 4 | <- 2 - 4: Function call: Int(0).R|kotlin/Int.rangeTo|(Int(5)) -> 5 | <- 3 - 5: Variable declaration: lval : R|kotlin/ranges/IntRange| -> 6 | <- 4 - 6: Access variable R|/| -> 7 | <- 5 - 7: Function call: R|/|.R|kotlin/ranges/IntProgression.iterator|() -> 8 | <- 6 - 8: Variable declaration: lval : R|kotlin/collections/IntIterator| -> 9 | <- 7 - 9: Enter while loop -> 10 | <- 8 -10: Enter loop condition -> 11 | <- 9, 23 -11: Access variable R|/| -> 12 | <- 10 -12: Function call: R|/|.R|FakeOverride|() -> 13 | <- 11 -13: Exit loop condition -> 14, 24 | <- 12 -14: Enter loop block -> 15 | <- 13 -15: Enter block -> 16 | <- 14 -16: Access variable R|/| -> 17 | <- 15 -17: Function call: R|/|.R|kotlin/collections/IntIterator.next|() -> 18 | <- 16 -18: Variable declaration: lval i: R|kotlin/Int| -> 19 | <- 17 -19: Access variable R|/x| -> 20 | <- 18 -20: Type operator: "x is String" -> 21 | <- 19 -21: Variable declaration: lval y: R|kotlin/Boolean| -> 22 | <- 20 -22: Exit block -> 23 | <- 21 -23: Exit loop block -> 10 | <- 22 -24: Exit whileloop -> 25 | <- 13 -25: Access variable R|/x| -> 26 | <- 24 -26: Type operator: "x is String" -> 27 | <- 25 -27: Exit block -> 28 | <- 26 -28: Exit function "testFor" -> | <- 27 - diff --git a/compiler/fir/resolve/testData/resolve/cfg/postponedLambdas.dot b/compiler/fir/resolve/testData/resolve/cfg/postponedLambdas.dot index 004de94595e..148a19a8eb9 100644 --- a/compiler/fir/resolve/testData/resolve/cfg/postponedLambdas.dot +++ b/compiler/fir/resolve/testData/resolve/cfg/postponedLambdas.dot @@ -25,7 +25,7 @@ digraph postponedLambdas_kt { 8 [label="Postponed exit from lambda"]; 9 [label="Access variable R|/b|"]; 10 [label="Function call: R|/foo|(vararg(R|/a|, foo@fun (): R|kotlin/String| { - String() + ^ String() } , R|/b|))"]; 11 [label="Exit function test" style="filled" fillcolor=red]; diff --git a/compiler/fir/resolve/testData/resolve/cfg/postponedLambdas.txt b/compiler/fir/resolve/testData/resolve/cfg/postponedLambdas.txt index f3c5aac694f..f23e8c10ef8 100644 --- a/compiler/fir/resolve/testData/resolve/cfg/postponedLambdas.txt +++ b/compiler/fir/resolve/testData/resolve/cfg/postponedLambdas.txt @@ -3,7 +3,7 @@ FILE: postponedLambdas.kt } 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| { - String() + ^ String() } , R|/b|)) } diff --git a/compiler/fir/resolve/testData/resolve/cfg/returnValuesFromLambda.dot b/compiler/fir/resolve/testData/resolve/cfg/returnValuesFromLambda.dot index e01c73981f5..bf3128a99f6 100644 --- a/compiler/fir/resolve/testData/resolve/cfg/returnValuesFromLambda.dot +++ b/compiler/fir/resolve/testData/resolve/cfg/returnValuesFromLambda.dot @@ -59,7 +59,7 @@ digraph returnValuesFromLambda_kt { } } - R|/C.C|() + ^ R|/C.C|() } )"]; 24 [label="Variable declaration: lval x: R|A|"]; diff --git a/compiler/fir/resolve/testData/resolve/cfg/returnValuesFromLambda.txt b/compiler/fir/resolve/testData/resolve/cfg/returnValuesFromLambda.txt index 04c3db6d453..213f36183b8 100644 --- a/compiler/fir/resolve/testData/resolve/cfg/returnValuesFromLambda.txt +++ b/compiler/fir/resolve/testData/resolve/cfg/returnValuesFromLambda.txt @@ -21,7 +21,7 @@ FILE: returnValuesFromLambda.kt } } - R|/C.C|() + ^ R|/C.C|() } ) } diff --git a/compiler/fir/resolve/testData/resolve/expresssions/CallBasedInExpressionGenerator.txt b/compiler/fir/resolve/testData/resolve/expresssions/CallBasedInExpressionGenerator.txt index 4879a8e890c..117ac2fefd0 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/CallBasedInExpressionGenerator.txt +++ b/compiler/fir/resolve/testData/resolve/expresssions/CallBasedInExpressionGenerator.txt @@ -15,7 +15,7 @@ FILE: CallBasedInExpressionGenerator.kt public final override fun generate(argument: R|ERROR CLASS: Symbol not found, for `StackValue`|): R|ERROR CLASS: Symbol not found, for `BranchedValue`| { ^generate R?C|org/jetbrains/kotlin/codegen/range/inExpression/CallBasedInExpressionGenerator.gen|(R|/argument|).#( = let@fun (): R|ERROR CLASS: Can't resolve when expression| { - when () { + ^ when () { this@R|org/jetbrains/kotlin/codegen/range/inExpression/CallBasedInExpressionGenerator|.R|org/jetbrains/kotlin/codegen/range/inExpression/CallBasedInExpressionGenerator.isInverted| -> { #(#) } diff --git a/compiler/fir/resolve/testData/resolve/expresssions/extensionPropertyInLambda.txt b/compiler/fir/resolve/testData/resolve/expresssions/extensionPropertyInLambda.txt index ed345a2653a..02ef71c036f 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/extensionPropertyInLambda.txt +++ b/compiler/fir/resolve/testData/resolve/expresssions/extensionPropertyInLambda.txt @@ -20,7 +20,7 @@ FILE: extensionPropertyInLambda.kt } public final fun test1(): R|kotlin/Unit| { R|/use|( = use@fun (): R|kotlin/String| { - R|/C.C|(String(abc)).R|/y| + ^ R|/C.C|(String(abc)).R|/y| } ) R|/use|(R|/C.C|(String(abc))::R|/y|) diff --git a/compiler/fir/resolve/testData/resolve/expresssions/invoke/doubleBrackets.txt b/compiler/fir/resolve/testData/resolve/expresssions/invoke/doubleBrackets.txt index 5a15c9a326f..0fcd2c6aef3 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/invoke/doubleBrackets.txt +++ b/compiler/fir/resolve/testData/resolve/expresssions/invoke/doubleBrackets.txt @@ -1,7 +1,7 @@ FILE: doubleBrackets.kt public final fun R|kotlin/String|.k(): R|() -> kotlin/String| { ^k fun (): R|kotlin/String| { - this@R|/k| + ^ this@R|/k| } } diff --git a/compiler/fir/resolve/testData/resolve/expresssions/lambda.txt b/compiler/fir/resolve/testData/resolve/expresssions/lambda.txt index 66cd4b9db63..a3781ec6335 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/lambda.txt +++ b/compiler/fir/resolve/testData/resolve/expresssions/lambda.txt @@ -9,27 +9,27 @@ FILE: lambda.kt } public final fun main(): R|kotlin/Unit| { R|/foo|( = foo@fun (): R|kotlin/Unit| { - String(This is test) + ^ String(This is test) } ) R|/bar|( = bar@fun (): R|kotlin/String| { - String(This is also test) + ^ String(This is also test) } ) R|/itIs|( = itIs@fun (it: R|kotlin/String|): R|kotlin/String| { - (String(this is ), R|/it|.R|kotlin/Any.toString|(), String( test)) + ^ (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| { - (String(This is test of ), R|/a|.R|kotlin/Any.toString|(), String(, ), R|/b|.R|kotlin/Any.toString|()) + ^ (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| { - String(OK) + ^ String(OK) } .R|FakeOverride|() lval f: R|() -> kotlin/String| = fun (): R|kotlin/String| { - String(OK) + ^ String(OK) } lval ss: R|kotlin/String| = R|/f|.R|FakeOverride|() diff --git a/compiler/fir/resolve/testData/resolve/expresssions/lambdaWithReceiver.txt b/compiler/fir/resolve/testData/resolve/expresssions/lambdaWithReceiver.txt index 7e81775f64d..b6f66d70178 100644 --- a/compiler/fir/resolve/testData/resolve/expresssions/lambdaWithReceiver.txt +++ b/compiler/fir/resolve/testData/resolve/expresssions/lambdaWithReceiver.txt @@ -35,7 +35,7 @@ FILE: lambdaWithReceiver.kt 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| + ^ R|/it|.R|kotlin/String.length| } ) } diff --git a/compiler/fir/resolve/testData/resolve/inference/nestedLambdas.txt b/compiler/fir/resolve/testData/resolve/inference/nestedLambdas.txt index b707158b645..3c4f6532ae3 100644 --- a/compiler/fir/resolve/testData/resolve/inference/nestedLambdas.txt +++ b/compiler/fir/resolve/testData/resolve/inference/nestedLambdas.txt @@ -18,8 +18,8 @@ FILE: nestedLambdas.kt ^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| { - R|/f|.R|kotlin/String.length| + ^ R|/w|.R|/associateBy1|( = associateBy1@fun (f: R|kotlin/String|): R|kotlin/Int| { + ^ R|/f|.R|kotlin/String.length| } ) } diff --git a/compiler/fir/resolve/testData/resolve/localObject.txt b/compiler/fir/resolve/testData/resolve/localObject.txt index 42691219966..8fdbd2ffe3b 100644 --- a/compiler/fir/resolve/testData/resolve/localObject.txt +++ b/compiler/fir/resolve/testData/resolve/localObject.txt @@ -19,7 +19,7 @@ FILE: localObject.kt } - Int(2) + ^ Int(2) } ) } @@ -76,7 +76,7 @@ FILE: localObject.kt } - Int(2) + ^ Int(2) } ) public get(): R|kotlin/Int| diff --git a/compiler/fir/resolve/testData/resolve/problems/covariantArrayAsReceiver.txt b/compiler/fir/resolve/testData/resolve/problems/covariantArrayAsReceiver.txt index f83b16ae962..49691934e4f 100644 --- a/compiler/fir/resolve/testData/resolve/problems/covariantArrayAsReceiver.txt +++ b/compiler/fir/resolve/testData/resolve/problems/covariantArrayAsReceiver.txt @@ -20,7 +20,7 @@ FILE: covariantArrayAsReceiver.kt 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|/it|.R|/UsageInfo.usage| is R|KtLightMethod|) + ^ (R|/it|.R|/UsageInfo.usage| is R|KtLightMethod|) } ) } diff --git a/compiler/fir/resolve/testData/resolve/problems/samConversionInConstructorCall.txt b/compiler/fir/resolve/testData/resolve/problems/samConversionInConstructorCall.txt index daa2ef63a4c..2f51641ad66 100644 --- a/compiler/fir/resolve/testData/resolve/problems/samConversionInConstructorCall.txt +++ b/compiler/fir/resolve/testData/resolve/problems/samConversionInConstructorCall.txt @@ -1,7 +1,7 @@ FILE: main.kt public final fun test(): R|kotlin/Unit| { #( = Foo@fun (): R|ERROR CLASS: Unresolved name: it| { - # + ^ # } ) } diff --git a/compiler/fir/resolve/testData/resolve/samConstructors/genericSam.txt b/compiler/fir/resolve/testData/resolve/samConstructors/genericSam.txt index cc75257ed31..6d3cc04eef8 100644 --- a/compiler/fir/resolve/testData/resolve/samConstructors/genericSam.txt +++ b/compiler/fir/resolve/testData/resolve/samConstructors/genericSam.txt @@ -1,15 +1,15 @@ FILE: main.kt public final fun main(): R|kotlin/Unit| { R|/MyFunction|( = MyFunction@fun (x: R|kotlin/Int|): R|kotlin/String| { - R|/x|.R|kotlin/Int.toInt|().R|kotlin/Any.toString|() + ^ R|/x|.R|kotlin/Int.toInt|().R|kotlin/Any.toString|() } ) R|/MyFunction|!|, R|ft!|>( = MyFunction@fun (x: R|kotlin/Int|): R|kotlin/String| { - R|/x|.R|kotlin/Any.toString|() + ^ R|/x|.R|kotlin/Any.toString|() } ) R|/MyFunction|!|>( = MyFunction@fun (x: R|kotlin/Any?|): R|kotlin/String| { - String() + ^ String() } ) } diff --git a/compiler/fir/resolve/testData/resolve/samConstructors/genericSamInferenceFromExpectType.txt b/compiler/fir/resolve/testData/resolve/samConstructors/genericSamInferenceFromExpectType.txt index 4db6916c001..e468bdcc691 100644 --- a/compiler/fir/resolve/testData/resolve/samConstructors/genericSamInferenceFromExpectType.txt +++ b/compiler/fir/resolve/testData/resolve/samConstructors/genericSamInferenceFromExpectType.txt @@ -7,23 +7,23 @@ FILE: main.kt } public final fun main(): R|kotlin/Unit| { R|/foo1|(R|/MyFunction|( = MyFunction@fun (x: R|kotlin/Int|): R|kotlin/String| { - R|/x|.R|kotlin/Int.toInt|().R|kotlin/Any.toString|() + ^ R|/x|.R|kotlin/Int.toInt|().R|kotlin/Any.toString|() } )) R|/foo2|(R|/MyFunction|!|>( = MyFunction@fun (x: R|kotlin/Number|): R|kotlin/String| { - R|/x|.R|kotlin/Number.toInt|().R|kotlin/Any.toString|() + ^ R|/x|.R|kotlin/Number.toInt|().R|kotlin/Any.toString|() } )) #(R|/MyFunction|!|, R|ft!|>( = MyFunction@fun (x: R|kotlin/Int|): R|kotlin/String| { - R|/x|.R|kotlin/Any.toString|() + ^ R|/x|.R|kotlin/Any.toString|() } )) R|/foo3|!|>(R|/MyFunction|!|>( = MyFunction@fun (x: R|kotlin/Int|): R|kotlin/String| { - R|/x|.R|kotlin/Int.plus|(Int(1)).R|kotlin/Any.toString|() + ^ 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|kotlin/String| { - R|/x|.R|kotlin/Number.toInt|().R|kotlin/Any.toString|() + ^ R|/x|.R|kotlin/Number.toInt|().R|kotlin/Any.toString|() } ), Int(2)) } diff --git a/compiler/fir/resolve/testData/resolve/samConstructors/kotlinSam.txt b/compiler/fir/resolve/testData/resolve/samConstructors/kotlinSam.txt index 3cfe5ee3b2f..e2715740b26 100644 --- a/compiler/fir/resolve/testData/resolve/samConstructors/kotlinSam.txt +++ b/compiler/fir/resolve/testData/resolve/samConstructors/kotlinSam.txt @@ -7,15 +7,15 @@ FILE: kotlinSam.kt } public final fun main(): R|kotlin/Unit| { R|/foo|(R|/MyRunnable|( = MyRunnable@fun (x: R|kotlin/Int|): R|kotlin/Boolean| { - >(R|/x|, Int(1)) + ^ >(R|/x|, Int(1)) } )) R|/foo|(R|/MyRunnable|(MyRunnable@fun (it: R|kotlin/Int|): R|kotlin/Boolean| { - >(R|/it|, Int(1)) + ^ >(R|/it|, Int(1)) } )) lval x: R|(kotlin/Int) -> kotlin/Boolean| = fun (x: R|kotlin/Int|): R|kotlin/Boolean| { - >(R|/x|, Int(1)) + ^ >(R|/x|, Int(1)) } R|/foo|(R|/MyRunnable|(R|/x|)) diff --git a/compiler/fir/resolve/testData/resolve/samConstructors/realConstructorFunction.txt b/compiler/fir/resolve/testData/resolve/samConstructors/realConstructorFunction.txt index 88fdeba9231..e516b219d71 100644 --- a/compiler/fir/resolve/testData/resolve/samConstructors/realConstructorFunction.txt +++ b/compiler/fir/resolve/testData/resolve/samConstructors/realConstructorFunction.txt @@ -6,15 +6,15 @@ FILE: main.kt } public final fun main(): R|kotlin/Unit| { #(R|/MyRunnable|( = MyRunnable@fun (x: R|kotlin/Int|): R|kotlin/Boolean| { - >(R|/x|, Int(1)) + ^ >(R|/x|, Int(1)) } )) #(R|/MyRunnable|(MyRunnable@fun (it: R|kotlin/Int|): R|kotlin/Boolean| { - >(R|/it|, Int(1)) + ^ >(R|/it|, Int(1)) } )) lval x: R|(kotlin/Int) -> kotlin/Boolean| = fun (x: R|kotlin/Int|): R|kotlin/Boolean| { - >(R|/x|, Int(1)) + ^ >(R|/x|, Int(1)) } #(R|/MyRunnable|(R|/x|)) diff --git a/compiler/fir/resolve/testData/resolve/samConstructors/simple.txt b/compiler/fir/resolve/testData/resolve/samConstructors/simple.txt index c78555d1a4b..229279c7691 100644 --- a/compiler/fir/resolve/testData/resolve/samConstructors/simple.txt +++ b/compiler/fir/resolve/testData/resolve/samConstructors/simple.txt @@ -3,15 +3,15 @@ FILE: main.kt } public final fun main(): R|kotlin/Unit| { R|/foo|(R|/MyRunnable|( = MyRunnable@fun (x: R|kotlin/Int|): R|kotlin/Boolean| { - >(R|/x|, Int(1)) + ^ >(R|/x|, Int(1)) } )) R|/foo|(R|/MyRunnable|(MyRunnable@fun (it: R|kotlin/Int|): R|kotlin/Boolean| { - >(R|/it|, Int(1)) + ^ >(R|/it|, Int(1)) } )) lval x: R|(kotlin/Int) -> kotlin/Boolean| = fun (x: R|kotlin/Int|): R|kotlin/Boolean| { - >(R|/x|, Int(1)) + ^ >(R|/x|, Int(1)) } R|/foo|(R|/MyRunnable|(R|/x|)) diff --git a/compiler/fir/resolve/testData/resolve/samConversions/genericSam.txt b/compiler/fir/resolve/testData/resolve/samConversions/genericSam.txt index 3d5f0ed8e3e..90579edbf31 100644 --- a/compiler/fir/resolve/testData/resolve/samConversions/genericSam.txt +++ b/compiler/fir/resolve/testData/resolve/samConversions/genericSam.txt @@ -1,23 +1,23 @@ FILE: main.kt public final fun main(): R|kotlin/Unit| { Q|JavaUsage|.R|/JavaUsage.foo1|( = foo1@fun (x: R|ft!|): R|ft!| { - R|/x|.R|kotlin/Int.toInt|().R|kotlin/Any.toString|() + ^ R|/x|.R|kotlin/Int.toInt|().R|kotlin/Any.toString|() } ) Q|JavaUsage|.R|/JavaUsage.foo2|( = foo2@fun (x: R|ft!|): R|ft!| { - R|/x|.R|kotlin/Number.toInt|().R|kotlin/Any.toString|() + ^ R|/x|.R|kotlin/Number.toInt|().R|kotlin/Any.toString|() } ) Q|JavaUsage|.#( = foo2@fun (x: R|kotlin/Int|): R|kotlin/String| { - R|/x|.R|kotlin/Any.toString|() + ^ R|/x|.R|kotlin/Any.toString|() } ) Q|JavaUsage|.R|/JavaUsage.foo3|!|>(foo3@fun (x: R|kotlin/Int|): R|kotlin/String| { - R|/x|.R|kotlin/Int.plus|(Int(1)).R|kotlin/Any.toString|() + ^ R|/x|.R|kotlin/Int.plus|(Int(1)).R|kotlin/Any.toString|() } , Int(1)) Q|JavaUsage|.R|/JavaUsage.foo3|!|>(foo3@fun (x: R|kotlin/Number|): R|kotlin/String| { - R|/x|.R|kotlin/Number.toInt|().R|kotlin/Any.toString|() + ^ R|/x|.R|kotlin/Number.toInt|().R|kotlin/Any.toString|() } , Int(2)) } diff --git a/compiler/fir/resolve/testData/resolve/samConversions/kotlinSam.txt b/compiler/fir/resolve/testData/resolve/samConversions/kotlinSam.txt index 89eeeb1daf1..95bc5690632 100644 --- a/compiler/fir/resolve/testData/resolve/samConversions/kotlinSam.txt +++ b/compiler/fir/resolve/testData/resolve/samConversions/kotlinSam.txt @@ -30,26 +30,26 @@ FILE: kotlinSam.kt } public final fun main(): R|kotlin/Unit| { lval f: R|(kotlin/Int) -> kotlin/Boolean| = fun (t: R|kotlin/Int|): R|kotlin/Boolean| { - >(R|/t|, Int(1)) + ^ >(R|/t|, Int(1)) } R|/foo1|( = foo1@fun (x: R|kotlin/Int|): R|kotlin/Boolean| { - >(R|/x|, Int(1)) + ^ >(R|/x|, Int(1)) } ) R|/foo1|(R|/f|) #( = foo2@fun (x: R|ERROR CLASS: No type for parameter|): R|kotlin/Boolean| { - >(R|/x|, Int(1)) + ^ >(R|/x|, Int(1)) } ) #(R|/f|) #( = foo3@fun (x: R|ERROR CLASS: No type for parameter|): R|kotlin/Boolean| { - >(R|/x|, Int(1)) + ^ >(R|/x|, Int(1)) } ) #(R|/f|) R|/foo4|( = foo4@fun (x: R|kotlin/Int|): R|kotlin/Boolean| { - >(R|/x|, Int(1)) + ^ >(R|/x|, Int(1)) } ) R|/foo4|(R|/f|) diff --git a/compiler/fir/resolve/testData/resolve/samConversions/notSamBecauseOfSupertype.txt b/compiler/fir/resolve/testData/resolve/samConversions/notSamBecauseOfSupertype.txt index d165c2534da..0b88c880c4c 100644 --- a/compiler/fir/resolve/testData/resolve/samConversions/notSamBecauseOfSupertype.txt +++ b/compiler/fir/resolve/testData/resolve/samConversions/notSamBecauseOfSupertype.txt @@ -3,15 +3,15 @@ FILE: main.kt } public final fun main(): R|kotlin/Unit| { Q|JavaUsage|.#( = foo@fun (x: R|ERROR CLASS: No type for parameter|): R|kotlin/Boolean| { - >(R|/x|, Int(1)) + ^ >(R|/x|, Int(1)) } ) Q|JavaUsage|.#(foo@fun (): R|kotlin/Boolean| { - >(#, Int(1)) + ^ >(#, Int(1)) } ) lval x: R|(kotlin/Int) -> kotlin/Boolean| = fun (x: R|kotlin/Int|): R|kotlin/Boolean| { - >(R|/x|, Int(1)) + ^ >(R|/x|, Int(1)) } Q|JavaUsage|.#(R|/x|) diff --git a/compiler/fir/resolve/testData/resolve/samConversions/runnable.txt b/compiler/fir/resolve/testData/resolve/samConversions/runnable.txt index f265cd70f90..f4ad4bc83af 100644 --- a/compiler/fir/resolve/testData/resolve/samConversions/runnable.txt +++ b/compiler/fir/resolve/testData/resolve/samConversions/runnable.txt @@ -1,11 +1,11 @@ FILE: main.kt public final fun main(): R|kotlin/Unit| { Q|JavaClass|.R|/JavaClass.foo|( = foo@fun (): R|kotlin/Unit| { - String() + ^ String() } ) R|/JavaClass.JavaClass|().R|/JavaClass.bar|( = bar@fun (): R|kotlin/Unit| { - String() + ^ String() } ) } diff --git a/compiler/fir/resolve/testData/resolve/samConversions/samSupertype.txt b/compiler/fir/resolve/testData/resolve/samConversions/samSupertype.txt index db0ff600ba3..e53f958ae19 100644 --- a/compiler/fir/resolve/testData/resolve/samConversions/samSupertype.txt +++ b/compiler/fir/resolve/testData/resolve/samConversions/samSupertype.txt @@ -3,15 +3,15 @@ FILE: main.kt } public final fun main(): R|kotlin/Unit| { Q|JavaUsage|.R|/JavaUsage.foo|( = foo@fun (x: R|kotlin/Int|): R|kotlin/Boolean| { - >(R|/x|, Int(1)) + ^ >(R|/x|, Int(1)) } ) Q|JavaUsage|.R|/JavaUsage.foo|(foo@fun (it: R|kotlin/Int|): R|kotlin/Boolean| { - >(R|/it|, Int(1)) + ^ >(R|/it|, Int(1)) } ) lval x: R|(kotlin/Int) -> kotlin/Boolean| = fun (x: R|kotlin/Int|): R|kotlin/Boolean| { - >(R|/x|, Int(1)) + ^ >(R|/x|, Int(1)) } Q|JavaUsage|.R|/JavaUsage.foo|(R|/x|) diff --git a/compiler/fir/resolve/testData/resolve/samConversions/samSupertypeWithOverride.txt b/compiler/fir/resolve/testData/resolve/samConversions/samSupertypeWithOverride.txt index 0e330b694e5..4fffa4c2f05 100644 --- a/compiler/fir/resolve/testData/resolve/samConversions/samSupertypeWithOverride.txt +++ b/compiler/fir/resolve/testData/resolve/samConversions/samSupertypeWithOverride.txt @@ -3,15 +3,15 @@ FILE: main.kt } public final fun main(): R|kotlin/Unit| { Q|JavaUsage|.R|/JavaUsage.foo|( = foo@fun (x: R|kotlin/Int|): R|ft!| { - >(R|/x|, Int(1)) + ^ >(R|/x|, Int(1)) } ) Q|JavaUsage|.R|/JavaUsage.foo|(foo@fun (it: R|kotlin/Int|): R|ft!| { - >(R|/it|, Int(1)) + ^ >(R|/it|, Int(1)) } ) lval x: R|(kotlin/Int) -> kotlin/Boolean| = fun (x: R|kotlin/Int|): R|kotlin/Boolean| { - >(R|/x|, Int(1)) + ^ >(R|/x|, Int(1)) } Q|JavaUsage|.R|/JavaUsage.foo|(R|/x|) diff --git a/compiler/fir/resolve/testData/resolve/samConversions/samWithEquals.txt b/compiler/fir/resolve/testData/resolve/samConversions/samWithEquals.txt index e217f3eb161..a6d69638131 100644 --- a/compiler/fir/resolve/testData/resolve/samConversions/samWithEquals.txt +++ b/compiler/fir/resolve/testData/resolve/samConversions/samWithEquals.txt @@ -12,7 +12,7 @@ FILE: main.kt } } - Boolean(false) + ^ Boolean(false) } ) } diff --git a/compiler/fir/resolve/testData/resolve/samConversions/simple.txt b/compiler/fir/resolve/testData/resolve/samConversions/simple.txt index db0ff600ba3..e53f958ae19 100644 --- a/compiler/fir/resolve/testData/resolve/samConversions/simple.txt +++ b/compiler/fir/resolve/testData/resolve/samConversions/simple.txt @@ -3,15 +3,15 @@ FILE: main.kt } public final fun main(): R|kotlin/Unit| { Q|JavaUsage|.R|/JavaUsage.foo|( = foo@fun (x: R|kotlin/Int|): R|kotlin/Boolean| { - >(R|/x|, Int(1)) + ^ >(R|/x|, Int(1)) } ) Q|JavaUsage|.R|/JavaUsage.foo|(foo@fun (it: R|kotlin/Int|): R|kotlin/Boolean| { - >(R|/it|, Int(1)) + ^ >(R|/it|, Int(1)) } ) lval x: R|(kotlin/Int) -> kotlin/Boolean| = fun (x: R|kotlin/Int|): R|kotlin/Boolean| { - >(R|/x|, Int(1)) + ^ >(R|/x|, Int(1)) } Q|JavaUsage|.R|/JavaUsage.foo|(R|/x|) diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/inPlaceLambdas.dot b/compiler/fir/resolve/testData/resolve/smartcasts/inPlaceLambdas.dot index cfb6f147803..188dc4b3dfc 100644 --- a/compiler/fir/resolve/testData/resolve/smartcasts/inPlaceLambdas.dot +++ b/compiler/fir/resolve/testData/resolve/smartcasts/inPlaceLambdas.dot @@ -103,7 +103,7 @@ digraph inPlaceLambdas_kt { } 33 [label="Postponed exit from lambda"]; 34 [label="Function call: R|/run|( = run@fun (): R|kotlin/Unit| { - (R|/x| as R|B|) + ^ (R|/x| as R|B|) } )"]; 35 [label="Access variable R|/x|"]; @@ -155,7 +155,7 @@ digraph inPlaceLambdas_kt { 54 [label="Postponed exit from lambda"]; 55 [label="Function call: R|/run|( = run@fun (): R|kotlin/Unit| { R|/x|.R|/A.foo|() - (R|/x| as R|B|) + ^ (R|/x| as R|B|) } )"]; 56 [label="Access variable R|/x|"]; diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/inPlaceLambdas.txt b/compiler/fir/resolve/testData/resolve/smartcasts/inPlaceLambdas.txt index a03728e273e..473f04676e9 100644 --- a/compiler/fir/resolve/testData/resolve/smartcasts/inPlaceLambdas.txt +++ b/compiler/fir/resolve/testData/resolve/smartcasts/inPlaceLambdas.txt @@ -23,7 +23,7 @@ FILE: inPlaceLambdas.kt } public final fun test_2(x: R|kotlin/Any?|): R|kotlin/Unit| { R|/run|( = run@fun (): R|kotlin/Unit| { - (R|/x| as R|B|) + ^ (R|/x| as R|B|) } ) R|/x|.R|/B.bar|() @@ -33,7 +33,7 @@ FILE: inPlaceLambdas.kt (R|/x| is R|A|) -> { R|/run|( = run@fun (): R|kotlin/Unit| { R|/x|.R|/A.foo|() - (R|/x| as R|B|) + ^ (R|/x| as R|B|) } ) R|/x|.R|/B.bar|() diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/safeCalls.dot b/compiler/fir/resolve/testData/resolve/smartcasts/safeCalls.dot index 3ffb6585279..8d3df8aaeb6 100644 --- a/compiler/fir/resolve/testData/resolve/smartcasts/safeCalls.dot +++ b/compiler/fir/resolve/testData/resolve/smartcasts/safeCalls.dot @@ -116,7 +116,7 @@ digraph safeCalls_kt { 46 [label="Postponed enter to lambda"]; 47 [label="Postponed exit from lambda"]; 48 [label="Function call: (R|/x| as? R|A|)?.R|/A.bar|(R|/x|)?.R|/foo|(R|/x|.R|/A.bool|())?.R|/let|( = let@fun (): R|kotlin/Unit| { - R|/x|.R|/A.bool|() + ^ R|/x|.R|/A.bool|() } )"]; 49 [label="Exit safe call"]; diff --git a/compiler/fir/resolve/testData/resolve/smartcasts/safeCalls.txt b/compiler/fir/resolve/testData/resolve/smartcasts/safeCalls.txt index fb80bfb393a..f75efb6e9f1 100644 --- a/compiler/fir/resolve/testData/resolve/smartcasts/safeCalls.txt +++ b/compiler/fir/resolve/testData/resolve/smartcasts/safeCalls.txt @@ -21,7 +21,7 @@ FILE: safeCalls.kt } public final fun test_3(x: R|kotlin/Any|): R|kotlin/Unit| { (R|/x| as? R|A|)?.R|/A.bar|(R|/x|)?.R|/foo|(R|/x|.R|/A.bool|())?.R|/let|( = let@fun (): R|kotlin/Unit| { - R|/x|.R|/A.bool|() + ^ R|/x|.R|/A.bool|() } ) R|/x|.#() diff --git a/compiler/fir/resolve/testData/resolve/stdlib/addAllOnJavaCollection.txt b/compiler/fir/resolve/testData/resolve/stdlib/addAllOnJavaCollection.txt index 2f6e5914d52..cf50df136e3 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/addAllOnJavaCollection.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/addAllOnJavaCollection.txt @@ -2,7 +2,7 @@ FILE: addAllOnJavaCollection.kt public final fun foo(): R|kotlin/Unit| { lval y: R|kotlin/collections/List| = R|kotlin/collections/listOf|(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| { - this@R|special/anonymous|.R|FakeOverride|(R|/y|) + ^ this@R|special/anonymous|.R|FakeOverride|(R|/y|) } ) lval z: R|java/util/ArrayList| = R|java/util/ArrayList.ArrayList|() diff --git a/compiler/fir/resolve/testData/resolve/stdlib/anonymousInDelegate.txt b/compiler/fir/resolve/testData/resolve/stdlib/anonymousInDelegate.txt index bdc100152d5..099ac7ed7e9 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/anonymousInDelegate.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/anonymousInDelegate.txt @@ -15,7 +15,7 @@ FILE: anonymousInDelegate.kt } - R|/foo|.R|/anonymous.bar|() + ^ R|/foo|.R|/anonymous.bar|() } ) public get(): R|kotlin/Int| { diff --git a/compiler/fir/resolve/testData/resolve/stdlib/contracts/callsInPlace.dot b/compiler/fir/resolve/testData/resolve/stdlib/contracts/callsInPlace.dot index e94ed3472df..799f9c93eb6 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/contracts/callsInPlace.dot +++ b/compiler/fir/resolve/testData/resolve/stdlib/contracts/callsInPlace.dot @@ -51,7 +51,7 @@ digraph callsInPlace_kt { } 18 [label="Postponed exit from lambda"]; 19 [label="Function call: R|kotlin/repeat|(Int(10), = repeat@fun (it: R|kotlin/Int|): R|kotlin/Unit| { - String(test_2) + ^ String(test_2) } )"]; 20 [label="Exit function test_2" style="filled" fillcolor=red]; @@ -81,7 +81,7 @@ digraph callsInPlace_kt { 26 [label="Postponed exit from lambda"]; 27 [label="Const: Int(10)"]; 28 [label="Function call: R|kotlin/repeat|(action = repeat@fun (it: R|kotlin/Int|): R|kotlin/Unit| { - String(test_3) + ^ String(test_3) } , times = Int(10))"]; 29 [label="Exit function test_3" style="filled" fillcolor=red]; @@ -115,7 +115,7 @@ digraph callsInPlace_kt { 39 [label="Postponed exit from lambda"]; 40 [label="Function call: Int(1).R|kotlin/takeUnless|( = takeUnless@fun (it: R|kotlin/Int|): R|kotlin/Boolean| { String(test_4) - >(R|/it|, Int(0)) + ^ >(R|/it|, Int(0)) } )"]; 41 [label="Exit function test_4" style="filled" fillcolor=red]; @@ -151,7 +151,7 @@ digraph callsInPlace_kt { 51 [label="Postponed exit from lambda"]; 52 [label="Function call: Int(1).R|kotlin/takeUnless|(predicate = takeUnless@fun (it: R|kotlin/Int|): R|kotlin/Boolean| { String(test_5) - >(R|/it|, Int(0)) + ^ >(R|/it|, Int(0)) } )"]; 53 [label="Exit function test_5" style="filled" fillcolor=red]; @@ -202,10 +202,10 @@ digraph callsInPlace_kt { } 68 [label="Postponed exit from lambda"]; 69 [label="Function call: R|/myRun|(myRun@fun (): R|kotlin/Unit| { - String(test_6_1) + ^ String(test_6_1) } , = myRun@fun (): R|kotlin/Unit| { - String(test_6_2) + ^ String(test_6_2) } )"]; 70 [label="Exit function test_6" style="filled" fillcolor=red]; @@ -248,10 +248,10 @@ digraph callsInPlace_kt { } 81 [label="Postponed exit from lambda"]; 82 [label="Function call: R|/myRun|(block2 = myRun@fun (): R|kotlin/Unit| { - String(test_7_2) + ^ String(test_7_2) } , block1 = myRun@fun (): R|kotlin/Unit| { - String(test_7_1) + ^ String(test_7_1) } )"]; 83 [label="Exit function test_7" style="filled" fillcolor=red]; @@ -290,7 +290,7 @@ digraph callsInPlace_kt { 88 [label="Postponed enter to lambda"]; 89 [label="Postponed exit from lambda"]; 90 [label="Function call: R|/myDummyRun|( = myDummyRun@fun (): R|kotlin/Unit| { - String(test_8) + ^ String(test_8) } )"]; 91 [label="Exit function test_8" style="filled" fillcolor=red]; diff --git a/compiler/fir/resolve/testData/resolve/stdlib/contracts/callsInPlace.txt b/compiler/fir/resolve/testData/resolve/stdlib/contracts/callsInPlace.txt index e4bb07e37e1..f139f1309c7 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/contracts/callsInPlace.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/contracts/callsInPlace.txt @@ -9,27 +9,27 @@ FILE: callsInPlace.kt } public final fun test_2(): R|kotlin/Unit| { R|kotlin/repeat|(Int(10), = repeat@fun (it: R|kotlin/Int|): R|kotlin/Unit| { - String(test_2) + ^ String(test_2) } ) } public final fun test_3(): R|kotlin/Unit| { R|kotlin/repeat|(action = repeat@fun (it: R|kotlin/Int|): R|kotlin/Unit| { - String(test_3) + ^ 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| { String(test_4) - >(R|/it|, Int(0)) + ^ >(R|/it|, 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| { String(test_5) - >(R|/it|, Int(0)) + ^ >(R|/it|, Int(0)) } ) } @@ -39,19 +39,19 @@ FILE: callsInPlace.kt } public final fun test_6(): R|kotlin/Unit| { R|/myRun|(myRun@fun (): R|kotlin/Unit| { - String(test_6_1) + ^ String(test_6_1) } , = myRun@fun (): R|kotlin/Unit| { - String(test_6_2) + ^ String(test_6_2) } ) } public final fun test_7(): R|kotlin/Unit| { R|/myRun|(block2 = myRun@fun (): R|kotlin/Unit| { - String(test_7_2) + ^ String(test_7_2) } , block1 = myRun@fun (): R|kotlin/Unit| { - String(test_7_1) + ^ String(test_7_1) } ) } @@ -60,7 +60,7 @@ FILE: callsInPlace.kt } public final fun test_8(): R|kotlin/Unit| { R|/myDummyRun|( = myDummyRun@fun (): R|kotlin/Unit| { - String(test_8) + ^ String(test_8) } ) } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/functionX.txt b/compiler/fir/resolve/testData/resolve/stdlib/functionX.txt index fed6d6312cc..7a456c8bb4c 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/functionX.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/functionX.txt @@ -1,11 +1,11 @@ FILE: functionX.kt public final val x: R|kotlin/jvm/functions/Function0| = fun (): R|kotlin/Int| { - Int(42) + ^ 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| { - R|/it| + ^ R|/it| } public get(): R|(kotlin/String) -> kotlin/String| diff --git a/compiler/fir/resolve/testData/resolve/stdlib/hashTableWithForEach.txt b/compiler/fir/resolve/testData/resolve/stdlib/hashTableWithForEach.txt index 46d4c1bb674..ec8d51af5ba 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/hashTableWithForEach.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/hashTableWithForEach.txt @@ -15,7 +15,7 @@ FILE: hashTableWithForEach.kt R|/DEBUG| -> { ^ Q|java/util/Collections|.R|java/util/Collections.unmodifiableSet||>(R|kotlin/collections/mutableSetOf||>().R|kotlin/apply|>|>( = apply@fun R|kotlin/collections/MutableSet>|.(): R|kotlin/Unit| { this@R|/SomeHashTable|.R|FakeOverride|( = forEach@fun (key: R|K|, value: R|V|): R|kotlin/Unit| { - this@R|special/anonymous|.R|FakeOverride|(R|/SomeHashTable.Entry.Entry|(R|/key|, R|/value|)) + ^ this@R|special/anonymous|.R|FakeOverride|(R|/SomeHashTable.Entry.Entry|(R|/key|, R|/value|)) } ) } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/implicitReceiverOrder.txt b/compiler/fir/resolve/testData/resolve/stdlib/implicitReceiverOrder.txt index a229b66099e..f19eee859d1 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/implicitReceiverOrder.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/implicitReceiverOrder.txt @@ -29,17 +29,17 @@ 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|/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|() + ^ (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|/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|() + ^ (this@R|special/anonymous|, this@R|special/anonymous|).R|/A.bar|() } ) } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/inference/complexConstraintSystem.txt b/compiler/fir/resolve/testData/resolve/stdlib/inference/complexConstraintSystem.txt index 55157275558..51a30e0bcf4 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/inference/complexConstraintSystem.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/inference/complexConstraintSystem.txt @@ -10,7 +10,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?| { - when () { + ^ when () { R|/b| -> { R|/Inv.Inv|(R|/it|) } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/j+k/FunctionTypeInJava.txt b/compiler/fir/resolve/testData/resolve/stdlib/j+k/FunctionTypeInJava.txt index 269727eacc1..87fa9c4604a 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/j+k/FunctionTypeInJava.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/j+k/FunctionTypeInJava.txt @@ -1,24 +1,24 @@ FILE: main.kt public final fun main(): R|kotlin/Unit| { Q|JavaClass|.R|/JavaClass.foo1|( = foo1@fun (): R|ft!| { - Int(123) + ^ Int(123) } ) Q|JavaClass|.R|/JavaClass.foo2|( = foo2@fun (it: R|ft!|): R|ft!| { - R|/it|.R|kotlin/Int.plus|(Int(2)).R|kotlin/Any.toString|() + ^ R|/it|.R|kotlin/Int.plus|(Int(2)).R|kotlin/Any.toString|() } ) Q|JavaClass|.R|/JavaClass.foo2|(foo2@fun (it: R|ft!|): R|ft!| { - R|/it|.R|kotlin/Int.plus|(Int(3)).R|kotlin/Any.toString|() + ^ 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| { - R|/x|.R|kotlin/Any.toString|() + ^ R|/x|.R|kotlin/Any.toString|() } Q|JavaClass|.R|/JavaClass.foo2|(R|/y|) Q|JavaClass|.R|/JavaClass.foo3|(foo3@fun (it: R|kotlin/Int|): R|ft!| { - R|/it|.R|kotlin/Int.plus|(Int(4)).R|kotlin/Any.toString|() + ^ R|/it|.R|kotlin/Int.plus|(Int(4)).R|kotlin/Any.toString|() } , Int(5)) } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/j+k/MyMap.txt b/compiler/fir/resolve/testData/resolve/stdlib/j+k/MyMap.txt index b60ab49c4b5..d02f6810fe4 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/j+k/MyMap.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/j+k/MyMap.txt @@ -1,7 +1,7 @@ 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|kotlin/String| { - String(value) + ^ String(value) } ) lval otherResult: R|ft!| = R|/map|.R|FakeOverride!|>|(String(key), String(value)) @@ -9,7 +9,7 @@ FILE: test.kt R|/map|.R|FakeOverride|( = 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|/value|.R|kotlin/String.length| } ) R|/map|.R|kotlin/collections/forEach|!|, R|ft!|>( = forEach@fun (: R|kotlin/collections/Map.Entry!, ft!>|): R|kotlin/Unit| { @@ -17,13 +17,13 @@ FILE: test.kt 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|())) R|/key|.R|kotlin/String.length| - R|/value|.R|kotlin/String.length| + ^ R|/value|.R|kotlin/String.length| } ) } 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| { - String(value) + ^ String(value) } ) lval otherResult: R|kotlin/String| = R|/map|.R|FakeOverride|(String(key), String(value)) @@ -31,7 +31,7 @@ FILE: test.kt R|/map|.R|FakeOverride|( = forEach@fun (key: R|kotlin/String|, value: R|kotlin/String|): 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|/value|.R|kotlin/String.length| } ) R|/map|.R|kotlin/collections/forEach|( = forEach@fun (: R|kotlin/collections/Map.Entry|): R|kotlin/Unit| { @@ -39,7 +39,7 @@ FILE: test.kt 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|())) R|/key|.R|kotlin/String.length| - R|/value|.R|kotlin/String.length| + ^ R|/value|.R|kotlin/String.length| } ) } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/j+k/SyntheticAfterFiltering.txt b/compiler/fir/resolve/testData/resolve/stdlib/j+k/SyntheticAfterFiltering.txt index 004c4b6d5fe..c393f037737 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/j+k/SyntheticAfterFiltering.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/j+k/SyntheticAfterFiltering.txt @@ -1,7 +1,7 @@ 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| { - ==(R|/it|.R|/XmlTag.localName|, R|/name|) + ^ ==(R|/it|.R|/XmlTag.localName|, R|/name|) } ) ^foo R|/result| diff --git a/compiler/fir/resolve/testData/resolve/stdlib/j+k/SyntheticWithForEach.txt b/compiler/fir/resolve/testData/resolve/stdlib/j+k/SyntheticWithForEach.txt index cfe8c2eedef..b2ad98d9aac 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/j+k/SyntheticWithForEach.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/j+k/SyntheticWithForEach.txt @@ -2,12 +2,12 @@ FILE: test.kt public final fun R|Call|.testForEach(): R|kotlin/Unit| { this@R|/testForEach|.R|/Call.arguments|.R|FakeOverride|( = forEach@fun (key: R|ft!|, value: R|ft!|): R|kotlin/Unit| { R|/key|.R|kotlin/String.length| - R|/value|.R|kotlin/String.length| + ^ 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| { R|/it|.R|FakeOverride!|>|.R|kotlin/String.length| - R|/it|.R|FakeOverride!|>|.R|kotlin/String.length| + ^ R|/it|.R|FakeOverride!|>|.R|kotlin/String.length| } ) } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/javaLangComparator.txt b/compiler/fir/resolve/testData/resolve/stdlib/javaLangComparator.txt index 4e9670c1ece..ac8bda89f68 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/javaLangComparator.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/javaLangComparator.txt @@ -1,7 +1,7 @@ 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|kotlin/Int|, y: R|kotlin/Int|): R|kotlin/Int| { - Int(1) + ^ Int(1) } ) } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/kotlinComparatorAlias.txt b/compiler/fir/resolve/testData/resolve/stdlib/kotlinComparatorAlias.txt index cce904a6f30..359c24ba395 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/kotlinComparatorAlias.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/kotlinComparatorAlias.txt @@ -1,7 +1,7 @@ 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|kotlin/Int|, y: R|kotlin/Int|): R|kotlin/Int| { - Int(1) + ^ Int(1) } ) } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/mapList.txt b/compiler/fir/resolve/testData/resolve/stdlib/mapList.txt index a9a70b7651d..81b205011a0 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/mapList.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/mapList.txt @@ -2,12 +2,12 @@ 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| { - R|/it|.R|kotlin/Int.plus|(R|/it|) + ^ R|/it|.R|kotlin/Int.plus|(R|/it|) } ) R|/u|.R|/applyX||>( = applyX@fun R|kotlin/collections/List|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|FakeOverride|(Int(1)) - this@R|special/anonymous|.R|FakeOverride|(Int(1)) + ^ this@R|special/anonymous|.R|FakeOverride|(Int(1)) } ) } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/multipleImplicitReceivers.txt b/compiler/fir/resolve/testData/resolve/stdlib/multipleImplicitReceivers.txt index ca23965485b..69973865c94 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/multipleImplicitReceivers.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/multipleImplicitReceivers.txt @@ -26,10 +26,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|(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| { - (this@R|special/anonymous|, (this@R|special/anonymous|, this@R|special/anonymous|).R|/IFoo.foo|).R|/IInvoke.invoke|() + ^ 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/resolve/testData/resolve/stdlib/noneWithForEach.txt b/compiler/fir/resolve/testData/resolve/stdlib/noneWithForEach.txt index 06658ff6d0f..f61da3884a6 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/noneWithForEach.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/noneWithForEach.txt @@ -7,13 +7,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|/it|.R|/Diagnostic.name| + ^ R|/it|.R|/Diagnostic.name| } ).R|kotlin/collections/forEach||>( = forEach@fun (it: R|kotlin/collections/Map.Entry>|): R|kotlin/Unit| { lval diagnostics: R|kotlin/collections/List| = R|/it|.R|FakeOverride|>| - R|/filtered|.R|FakeOverride|(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|) + ^ R|/filtered|.R|FakeOverride|(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/resolve/testData/resolve/stdlib/problems/complexSmartCasts.txt b/compiler/fir/resolve/testData/resolve/stdlib/problems/complexSmartCasts.txt index f041a578478..23843c1fb42 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/problems/complexSmartCasts.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/problems/complexSmartCasts.txt @@ -18,7 +18,7 @@ FILE: complexSmartCasts.kt } R|/runHigherOrder|( = runHigherOrder@fun (): R|kotlin/Boolean| { - R|/s|.R|kotlin/text/isNotEmpty|() + ^ R|/s|.R|kotlin/text/isNotEmpty|() } ) } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/problems/delegateTypeMismatch.txt b/compiler/fir/resolve/testData/resolve/stdlib/problems/delegateTypeMismatch.txt index 1fd3fbe3717..82a5b9de3b8 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/problems/delegateTypeMismatch.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/problems/delegateTypeMismatch.txt @@ -20,7 +20,7 @@ FILE: delegateTypeMismatch.kt 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|kotlin/reflect/KProperty<*>|, _: R|T|, _: R|T|): R|kotlin/Boolean| { - when () { + ^ when () { this@R|/A|.R|/A.isLocked| -> { throw R|java/lang/IllegalStateException.IllegalStateException|(String(Cannot modify readonly DescriptorRendererOptions)) } @@ -42,7 +42,7 @@ FILE: delegateTypeMismatch.kt } public final var typeNormalizer: by # KotlinType|>(property@fun (): R|ERROR CLASS: Unresolved name: it| { - # + ^ # } ) public get(): { diff --git a/compiler/fir/resolve/testData/resolve/stdlib/problems/inapplicableRemoveAll.txt b/compiler/fir/resolve/testData/resolve/stdlib/problems/inapplicableRemoveAll.txt index d1dd7f6154b..3b84d045567 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/problems/inapplicableRemoveAll.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/problems/inapplicableRemoveAll.txt @@ -1,7 +1,7 @@ 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|/it|.R|kotlin/text/isEmpty|() + ^ R|/it|.R|kotlin/text/isEmpty|() } ) } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/recursiveBug.txt b/compiler/fir/resolve/testData/resolve/stdlib/recursiveBug.txt index 59077492b15..0d0e7705f30 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/recursiveBug.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/recursiveBug.txt @@ -5,7 +5,7 @@ FILE: recursiveBug.kt } public final val result: R|kotlin/String| = this@R|/Foo|.R|kotlin/run|( = run@fun R|Foo|.(): R|kotlin/String| { - R|/name|.R|FakeOverride|() + ^ R|/name|.R|FakeOverride|() } ) public get(): R|kotlin/String| @@ -16,7 +16,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| { - R|/name|.R|FakeOverride|() + ^ R|/name|.R|FakeOverride|() } ) lval name: R|kotlin/Int| = R|/result|.R|kotlin/String.length| diff --git a/compiler/fir/resolve/testData/resolve/stdlib/simpleLazy.txt b/compiler/fir/resolve/testData/resolve/stdlib/simpleLazy.txt index ac493823236..487c6662c52 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/simpleLazy.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/simpleLazy.txt @@ -1,6 +1,6 @@ FILE: simpleLazy.kt public final val x: R|kotlin/String|by R|kotlin/lazy|( = lazy@fun (): R|kotlin/String| { - String(Hello) + ^ String(Hello) } ) public get(): R|kotlin/String| { @@ -9,7 +9,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| { - String(Bye) + ^ String(Bye) } ) R|/y|.R|kotlin/String.length| @@ -20,7 +20,7 @@ FILE: simpleLazy.kt } public final val z: R|kotlin/String|by R|kotlin/lazy|( = lazy@fun (): R|kotlin/String| { - String(Some) + ^ String(Some) } ) public get(): R|kotlin/String| { diff --git a/compiler/fir/resolve/testData/resolve/stdlib/smartcasts/tryWithLambdaInside.dot b/compiler/fir/resolve/testData/resolve/stdlib/smartcasts/tryWithLambdaInside.dot index 12069603132..a440a846d76 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/smartcasts/tryWithLambdaInside.dot +++ b/compiler/fir/resolve/testData/resolve/stdlib/smartcasts/tryWithLambdaInside.dot @@ -48,7 +48,7 @@ digraph tryWithLambdaInside_kt { } 16 [label="Postponed exit from lambda"]; 17 [label="Function call: R|/list|.R|kotlin/collections/filter|( = filter@fun (it: R|kotlin/Boolean|): R|kotlin/Boolean| { - R|/it| + ^ R|/it| } )"]; 18 [label="Exit block"]; @@ -69,7 +69,7 @@ digraph tryWithLambdaInside_kt { } 25 [label="Jump: ^testInPlace try { R|/list|.R|kotlin/collections/filter|( = filter@fun (it: R|kotlin/Boolean|): R|kotlin/Boolean| { - R|/it| + ^ R|/it| } ) } @@ -120,7 +120,7 @@ finally { 33 [label="Postponed enter to lambda"]; 34 [label="Postponed exit from lambda"]; 35 [label="Function call: R|/list|.R|/notInPlaceFilter|( = notInPlaceFilter@fun (it: R|kotlin/Boolean|): R|kotlin/Boolean| { - R|/it| + ^ R|/it| } )"]; 36 [label="Exit block"]; @@ -141,7 +141,7 @@ finally { } 43 [label="Jump: ^testNotInPlace try { R|/list|.R|/notInPlaceFilter|( = notInPlaceFilter@fun (it: R|kotlin/Boolean|): R|kotlin/Boolean| { - R|/it| + ^ R|/it| } ) } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/smartcasts/tryWithLambdaInside.txt b/compiler/fir/resolve/testData/resolve/stdlib/smartcasts/tryWithLambdaInside.txt index e0de243fb68..7edf964115a 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/smartcasts/tryWithLambdaInside.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/smartcasts/tryWithLambdaInside.txt @@ -7,7 +7,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|/it| + ^ R|/it| } ) } @@ -18,7 +18,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|/it| + ^ R|/it| } ) } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/topLevelResolve.txt b/compiler/fir/resolve/testData/resolve/stdlib/topLevelResolve.txt index c6434c2895c..e9164fc29d3 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/topLevelResolve.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/topLevelResolve.txt @@ -20,24 +20,24 @@ FILE: topLevelResolve.kt } 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| { - R|/it|.R|kotlin/Int.times|(Int(2)) + ^ 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| { - R|/it|.R|kotlin/Int.times|(Int(2)) + ^ 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| { - R|/id|(R|/it|) + ^ 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| { - R|/it|.R|kotlin/String.length| + ^ 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| { - R|/it|.R|kotlin/Int.times|(R|/it|) + ^ 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|) } ) } @@ -45,11 +45,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| { - this@R|special/anonymous|.R|kotlin/String.length| + ^ this@R|special/anonymous|.R|kotlin/String.length| } ) lval indices: R|kotlin/ranges/IntRange| = R|kotlin/with|(String(), = with@fun R|kotlin/String|.(): R|kotlin/ranges/IntRange| { - this@R|special/anonymous|.R|kotlin/text/indices| + ^ this@R|special/anonymous|.R|kotlin/text/indices| } ) lval indicesNoWith: R|kotlin/ranges/IntRange| = String().R|kotlin/text/indices| diff --git a/compiler/fir/resolve/testData/resolve/stdlib/whenAsLambdaReturnStatement.txt b/compiler/fir/resolve/testData/resolve/stdlib/whenAsLambdaReturnStatement.txt index 505cd7ba472..484e078397a 100644 --- a/compiler/fir/resolve/testData/resolve/stdlib/whenAsLambdaReturnStatement.txt +++ b/compiler/fir/resolve/testData/resolve/stdlib/whenAsLambdaReturnStatement.txt @@ -13,7 +13,7 @@ FILE: whenAsLambdaReturnStatement.kt } 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| { - when () { + ^ when () { R|/b| -> { R|/module| } @@ -27,7 +27,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| { - try { + ^ try { String() } finally { diff --git a/compiler/fir/resolve/testData/resolve/whenAsReceiver.txt b/compiler/fir/resolve/testData/resolve/whenAsReceiver.txt index 95b97b8db58..7d6d364ebf5 100644 --- a/compiler/fir/resolve/testData/resolve/whenAsReceiver.txt +++ b/compiler/fir/resolve/testData/resolve/whenAsReceiver.txt @@ -12,7 +12,7 @@ FILE: whenAsReceiver.kt } } ?.R|/also|( = also@fun (): R|kotlin/Int| { - Int(1) + ^ Int(1) } ) } diff --git a/compiler/testData/codegen/box/binaryOp/divisionByZero.kt b/compiler/testData/codegen/box/binaryOp/divisionByZero.kt index 650cb251cdf..92d44f6d143 100644 --- a/compiler/testData/codegen/box/binaryOp/divisionByZero.kt +++ b/compiler/testData/codegen/box/binaryOp/divisionByZero.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JS // reason - no error from division by zero in JS diff --git a/compiler/testData/codegen/box/callableReference/function/newArray.kt b/compiler/testData/codegen/box/callableReference/function/newArray.kt index abb34ed6d46..b27d4e68ac9 100644 --- a/compiler/testData/codegen/box/callableReference/function/newArray.kt +++ b/compiler/testData/codegen/box/callableReference/function/newArray.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR private fun upcast(value: T): T = value fun box(): String { diff --git a/compiler/testData/codegen/box/callableReference/function/overloadedFun.kt b/compiler/testData/codegen/box/callableReference/function/overloadedFun.kt index 5088aa9fe6a..569ef57a1bb 100644 --- a/compiler/testData/codegen/box/callableReference/function/overloadedFun.kt +++ b/compiler/testData/codegen/box/callableReference/function/overloadedFun.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR fun foo(): String = "foo1" fun foo(i: Int): String = "foo2" diff --git a/compiler/testData/codegen/box/casts/asForConstants.kt b/compiler/testData/codegen/box/casts/asForConstants.kt index da0caed146c..698bee56383 100644 --- a/compiler/testData/codegen/box/casts/asForConstants.kt +++ b/compiler/testData/codegen/box/casts/asForConstants.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: JS_IR // TODO: muted automatically, investigate should it be ran for JS or not // IGNORE_BACKEND: JS diff --git a/compiler/testData/codegen/box/casts/lambdaToUnitCast.kt b/compiler/testData/codegen/box/casts/lambdaToUnitCast.kt index 813def79a85..94ddfb05c00 100644 --- a/compiler/testData/codegen/box/casts/lambdaToUnitCast.kt +++ b/compiler/testData/codegen/box/casts/lambdaToUnitCast.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR val foo: () -> Unit = {} fun box(): String { diff --git a/compiler/testData/codegen/box/classes/kt1439.kt b/compiler/testData/codegen/box/classes/kt1439.kt index 35b2eb080b8..f5cd98d49c4 100644 --- a/compiler/testData/codegen/box/classes/kt1439.kt +++ b/compiler/testData/codegen/box/classes/kt1439.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class MyClass(var fnc : () -> String) { fun test(): String { diff --git a/compiler/testData/codegen/box/classes/kt1721.kt b/compiler/testData/codegen/box/classes/kt1721.kt index 4d52f574fa5..c38869f87b8 100644 --- a/compiler/testData/codegen/box/classes/kt1721.kt +++ b/compiler/testData/codegen/box/classes/kt1721.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class T(val f : () -> Any?) { fun call() : Any? = f() } diff --git a/compiler/testData/codegen/box/classes/kt1726.kt b/compiler/testData/codegen/box/classes/kt1726.kt index ddcb0169c82..c718ea84028 100644 --- a/compiler/testData/codegen/box/classes/kt1726.kt +++ b/compiler/testData/codegen/box/classes/kt1726.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class Foo( var state : Int, val f : (Int) -> Int){ diff --git a/compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInLambdaInLocalClass.kt b/compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInLambdaInLocalClass.kt index 5a111515f04..477975f2193 100644 --- a/compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInLambdaInLocalClass.kt +++ b/compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInLambdaInLocalClass.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR open class Base(val fn: () -> String) fun box(): String { diff --git a/compiler/testData/codegen/box/closures/captureInSuperConstructorCall/referenceToCapturedVariablesInMultipleLambdas.kt b/compiler/testData/codegen/box/closures/captureInSuperConstructorCall/referenceToCapturedVariablesInMultipleLambdas.kt index 8408107845d..fdcfe92442e 100644 --- a/compiler/testData/codegen/box/closures/captureInSuperConstructorCall/referenceToCapturedVariablesInMultipleLambdas.kt +++ b/compiler/testData/codegen/box/closures/captureInSuperConstructorCall/referenceToCapturedVariablesInMultipleLambdas.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR open class Base(val fn1: () -> String, val fn2: () -> String) fun box(): String { diff --git a/compiler/testData/codegen/box/closures/closureWithParameter.kt b/compiler/testData/codegen/box/closures/closureWithParameter.kt index d7b8b20996b..6e5d15af401 100644 --- a/compiler/testData/codegen/box/closures/closureWithParameter.kt +++ b/compiler/testData/codegen/box/closures/closureWithParameter.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR fun box() : String { return apply( "OK", {arg: String -> arg } ) } diff --git a/compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt b/compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt index b5be30228f6..a1a13fb62a6 100644 --- a/compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt +++ b/compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR fun box() : String { return if (apply( 5, {arg: Int -> arg + 13 } ) == 18) "OK" else "fail" } diff --git a/compiler/testData/codegen/box/closures/doubleEnclosedLocalVariable.kt b/compiler/testData/codegen/box/closures/doubleEnclosedLocalVariable.kt index fad8ead2ab0..96ac7f2ef19 100644 --- a/compiler/testData/codegen/box/closures/doubleEnclosedLocalVariable.kt +++ b/compiler/testData/codegen/box/closures/doubleEnclosedLocalVariable.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR fun box() : String { val cl = 39 return if (sum(200, { val ff = {cl}; ff() }) == 239) "OK" else "FAIL" diff --git a/compiler/testData/codegen/box/closures/enclosingLocalVariable.kt b/compiler/testData/codegen/box/closures/enclosingLocalVariable.kt index 622cf756317..01e1a103ff2 100644 --- a/compiler/testData/codegen/box/closures/enclosingLocalVariable.kt +++ b/compiler/testData/codegen/box/closures/enclosingLocalVariable.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR fun box() : String { val cl = 39 return if (sum(200, { val m = { val r = { cl }; r() }; m() }) == 239) "OK" else "FAIL" diff --git a/compiler/testData/codegen/box/closures/kt4137.kt b/compiler/testData/codegen/box/closures/kt4137.kt index a862bce8999..ea401a6fe80 100644 --- a/compiler/testData/codegen/box/closures/kt4137.kt +++ b/compiler/testData/codegen/box/closures/kt4137.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR open class A(val s: Int) { } diff --git a/compiler/testData/codegen/box/closures/localClassLambdaClosure.kt b/compiler/testData/codegen/box/closures/localClassLambdaClosure.kt index 8d63c0dc67e..61fcbb61243 100644 --- a/compiler/testData/codegen/box/closures/localClassLambdaClosure.kt +++ b/compiler/testData/codegen/box/closures/localClassLambdaClosure.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR fun box(): String { val o = "O" val ok_L = {o + "K"} diff --git a/compiler/testData/codegen/box/closures/localReturn.kt b/compiler/testData/codegen/box/closures/localReturn.kt index 7e5dc67ddc7..cf6e749f41f 100644 --- a/compiler/testData/codegen/box/closures/localReturn.kt +++ b/compiler/testData/codegen/box/closures/localReturn.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR fun box(): String { val a = 1 val explicitlyReturned = run1 f@{ diff --git a/compiler/testData/codegen/box/closures/localReturnWithAutolabel.kt b/compiler/testData/codegen/box/closures/localReturnWithAutolabel.kt index 7b481e3e5eb..577f2100352 100644 --- a/compiler/testData/codegen/box/closures/localReturnWithAutolabel.kt +++ b/compiler/testData/codegen/box/closures/localReturnWithAutolabel.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR fun box(): String { val a = 1 val explicitlyReturned = run1 { diff --git a/compiler/testData/codegen/box/closures/simplestClosure.kt b/compiler/testData/codegen/box/closures/simplestClosure.kt index df1ea3233f4..7a9f3b439cf 100644 --- a/compiler/testData/codegen/box/closures/simplestClosure.kt +++ b/compiler/testData/codegen/box/closures/simplestClosure.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR fun box() : String { return invoker( {"OK"} ) } diff --git a/compiler/testData/codegen/box/closures/simplestClosureAndBoxing.kt b/compiler/testData/codegen/box/closures/simplestClosureAndBoxing.kt index 275ec10096f..50f22fbeb8d 100644 --- a/compiler/testData/codegen/box/closures/simplestClosureAndBoxing.kt +++ b/compiler/testData/codegen/box/closures/simplestClosureAndBoxing.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR fun box() : String { return if (int_invoker( { 7 } ) == 7) "OK" else "fail" } diff --git a/compiler/testData/codegen/box/closures/underscoreParameters.kt b/compiler/testData/codegen/box/closures/underscoreParameters.kt index fa1d8b574b7..02b96fd24f0 100644 --- a/compiler/testData/codegen/box/closures/underscoreParameters.kt +++ b/compiler/testData/codegen/box/closures/underscoreParameters.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR fun foo(block: (String, String, String) -> String): String = block("O", "fail", "K") fun box() = foo { x, _, y -> x + y } diff --git a/compiler/testData/codegen/box/constants/divisionByZero.kt b/compiler/testData/codegen/box/constants/divisionByZero.kt index c7e4f782dc4..fcb9ddd018f 100644 --- a/compiler/testData/codegen/box/constants/divisionByZero.kt +++ b/compiler/testData/codegen/box/constants/divisionByZero.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JS // reason - no error from division by zero in JS diff --git a/compiler/testData/codegen/box/constants/privateConst.kt b/compiler/testData/codegen/box/constants/privateConst.kt index 825473ddc4c..041cc94e9fd 100644 --- a/compiler/testData/codegen/box/constants/privateConst.kt +++ b/compiler/testData/codegen/box/constants/privateConst.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR private const val z = "OK"; fun box(): String { diff --git a/compiler/testData/codegen/box/controlStructures/kt17590.kt b/compiler/testData/codegen/box/controlStructures/kt17590.kt index ff31b034646..15dba9e8546 100644 --- a/compiler/testData/codegen/box/controlStructures/kt17590.kt +++ b/compiler/testData/codegen/box/controlStructures/kt17590.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR fun zap(s: String): String? = s inline fun tryZap(s: String, fn: (String) -> String): String { diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/deadTryCatch.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/deadTryCatch.kt index 9d3157d696e..41a91a17e08 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/deadTryCatch.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/deadTryCatch.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR inline fun catchAll(x: String, block: () -> Unit): String { try { block() diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryCatch.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryCatch.kt index 776f8dbac98..dd3a181348a 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryCatch.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryCatch.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR inline fun tryOrElse(f1: () -> T, f2: () -> T): T { try { return f1() diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryExpr.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryExpr.kt index 721d3fad13b..8205200452a 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryExpr.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryExpr.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR inline fun tryOrElse(f1: () -> T, f2: () -> T): T = try { f1() } catch (e: Exception) { f2() } diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryFinally.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryFinally.kt index ee864b7e7cc..eb488beb689 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryFinally.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryFinally.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR inline fun tryAndThen(f1: () -> Unit, f2: () -> Unit, f3: () -> T): T { try { f1() diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572.kt index 5717597510d..368df7ae6f9 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR fun zap(s: String) = s inline fun tryZap(string: String, fn: (String) -> String) = diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_2.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_2.kt index 706eda70180..ed417d9b8bc 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_2.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_2.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR fun zap(s: String) = s inline fun tryZap(s1: String, s2: String, fn: (String, String) -> String) = diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_nested.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_nested.kt index 054cc9cabbf..7d7467b0694 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_nested.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_nested.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR fun zap(s: String) = s inline fun tryZap(string: String, fn: (String) -> String) = diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17573.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17573.kt index c04436270da..de1d0b45cbc 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17573.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17573.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR fun zap(s: String) = s inline fun tryZap(string: String, fn: (String) -> String) = diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17573_nested.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17573_nested.kt index d6a865b4585..e241aec5239 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17573_nested.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17573_nested.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR fun zap(s: String) = s inline fun tryZap1(string: String, fn: (String) -> String) = diff --git a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTry.kt b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTry.kt index 2e24d391e7f..c60bde586a1 100644 --- a/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTry.kt +++ b/compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTry.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR inline fun test(s: () -> Int): Int = try { val i = s() diff --git a/compiler/testData/codegen/box/delegatedProperty/provideDelegate/evaluationOrder.kt b/compiler/testData/codegen/box/delegatedProperty/provideDelegate/evaluationOrder.kt index 066fbc16c05..762de10f841 100644 --- a/compiler/testData/codegen/box/delegatedProperty/provideDelegate/evaluationOrder.kt +++ b/compiler/testData/codegen/box/delegatedProperty/provideDelegate/evaluationOrder.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME import kotlin.test.* diff --git a/compiler/testData/codegen/box/destructuringDeclInLambdaParam/inline.kt b/compiler/testData/codegen/box/destructuringDeclInLambdaParam/inline.kt index 103b8253710..6835b91f21c 100644 --- a/compiler/testData/codegen/box/destructuringDeclInLambdaParam/inline.kt +++ b/compiler/testData/codegen/box/destructuringDeclInLambdaParam/inline.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR data class A(val x: String, val y: String) inline fun foo(a: A, block: (A) -> String): String = block(a) diff --git a/compiler/testData/codegen/box/destructuringDeclInLambdaParam/otherParameters.kt b/compiler/testData/codegen/box/destructuringDeclInLambdaParam/otherParameters.kt index 4e552b58605..f973aca1710 100644 --- a/compiler/testData/codegen/box/destructuringDeclInLambdaParam/otherParameters.kt +++ b/compiler/testData/codegen/box/destructuringDeclInLambdaParam/otherParameters.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR data class A(val x: String, val y: String) fun foo(a: A, block: (Int, A, String) -> String): String = block(1, a, "#") diff --git a/compiler/testData/codegen/box/destructuringDeclInLambdaParam/simple.kt b/compiler/testData/codegen/box/destructuringDeclInLambdaParam/simple.kt index 3cafbf7bc59..50523e3fec4 100644 --- a/compiler/testData/codegen/box/destructuringDeclInLambdaParam/simple.kt +++ b/compiler/testData/codegen/box/destructuringDeclInLambdaParam/simple.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR data class A(val x: String, val y: String) fun foo(a: A, block: (A) -> String): String = block(a) diff --git a/compiler/testData/codegen/box/diagnostics/functions/inference/kt6176.kt b/compiler/testData/codegen/box/diagnostics/functions/inference/kt6176.kt index 0a10f2d175b..15a7a2e94e2 100644 --- a/compiler/testData/codegen/box/diagnostics/functions/inference/kt6176.kt +++ b/compiler/testData/codegen/box/diagnostics/functions/inference/kt6176.kt @@ -1,5 +1,4 @@ // !DIAGNOSTICS: -DEBUG_INFO_SMARTCAST -// IGNORE_BACKEND_FIR: JVM_IR fun foo(f: () -> R): R = f() diff --git a/compiler/testData/codegen/box/extensionFunctions/kt1249.kt b/compiler/testData/codegen/box/extensionFunctions/kt1249.kt index c2b59e4d346..8078f5443fe 100644 --- a/compiler/testData/codegen/box/extensionFunctions/kt1249.kt +++ b/compiler/testData/codegen/box/extensionFunctions/kt1249.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR //KT-1249 IllegalStateException invoking function property class TestClass(val body : () -> Unit) : Any() { fun run() { diff --git a/compiler/testData/codegen/box/extensionFunctions/shared.kt b/compiler/testData/codegen/box/extensionFunctions/shared.kt index 1c2ade2aec6..3cf651590a4 100644 --- a/compiler/testData/codegen/box/extensionFunctions/shared.kt +++ b/compiler/testData/codegen/box/extensionFunctions/shared.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR infix fun T.mustBe(t : T) { assert("$this must be $t") {this == t} } diff --git a/compiler/testData/codegen/box/functions/bigArity/invokeLambda.kt b/compiler/testData/codegen/box/functions/bigArity/invokeLambda.kt index 2bdb0976370..afb24c958db 100644 --- a/compiler/testData/codegen/box/functions/bigArity/invokeLambda.kt +++ b/compiler/testData/codegen/box/functions/bigArity/invokeLambda.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +FunctionTypesWithBigArity -// IGNORE_BACKEND_FIR: JVM_IR class A(val value: Int) diff --git a/compiler/testData/codegen/box/functions/functionExpression/underscoreParameters.kt b/compiler/testData/codegen/box/functions/functionExpression/underscoreParameters.kt index 8bfcc30a852..b25ca696000 100644 --- a/compiler/testData/codegen/box/functions/functionExpression/underscoreParameters.kt +++ b/compiler/testData/codegen/box/functions/functionExpression/underscoreParameters.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR fun foo(block: (String, String, String) -> String): String = block("O", "fail", "K") fun box() = foo(fun(x: String, _: String, y: String) = x + y) diff --git a/compiler/testData/codegen/box/functions/invoke/invoke.kt b/compiler/testData/codegen/box/functions/invoke/invoke.kt index 74b7823c410..21214b85835 100644 --- a/compiler/testData/codegen/box/functions/invoke/invoke.kt +++ b/compiler/testData/codegen/box/functions/invoke/invoke.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR package invoke fun test1(predicate: (Int) -> Int, i: Int) = predicate(i) @@ -24,6 +23,9 @@ fun box() : String { if (test2({ it }, 2) != 2) return "fail 2" if (test3(Method(), 3) != 3) return "fail 3" if (test4(Method(), 4) != 4) return "fail 4" - if (test5(Method2(), "s") != "s") return "fail5" + if (test5(Method2(), "s") != "s") return "fail 5" + if (test1(Int::dec, 1) != 0) return "fail 6" + if (test2(Int::dec, 1) != 0) return "fail 7" + if (test1(fun(x: Int) = x - 1, 1) != 0) return "fail 8" return "OK" } diff --git a/compiler/testData/codegen/box/functions/invoke/invokeOnExprByConvention.kt b/compiler/testData/codegen/box/functions/invoke/invokeOnExprByConvention.kt index 1f24cb59cb6..16e174b8db5 100644 --- a/compiler/testData/codegen/box/functions/invoke/invokeOnExprByConvention.kt +++ b/compiler/testData/codegen/box/functions/invoke/invokeOnExprByConvention.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR //KT-3217 Invoke convention after function invocation doesn't work //KT-2728 Can't compile A()() diff --git a/compiler/testData/codegen/box/functions/invoke/kt3189.kt b/compiler/testData/codegen/box/functions/invoke/kt3189.kt index 2057ddd411a..be9a0f42107 100644 --- a/compiler/testData/codegen/box/functions/invoke/kt3189.kt +++ b/compiler/testData/codegen/box/functions/invoke/kt3189.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR //KT-3189 Function invoke is called with no reason fun box(): String { diff --git a/compiler/testData/codegen/box/functions/invoke/kt3297.kt b/compiler/testData/codegen/box/functions/invoke/kt3297.kt index b0de24283ff..026ac7a3b37 100644 --- a/compiler/testData/codegen/box/functions/invoke/kt3297.kt +++ b/compiler/testData/codegen/box/functions/invoke/kt3297.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR //KT-3297 Calling the wrong function inside an extension method to the Function0 class infix fun Function0.or(alt: () -> R): R { diff --git a/compiler/testData/codegen/box/functions/kt1739.kt b/compiler/testData/codegen/box/functions/kt1739.kt index 4ffe518eda4..8bae1437342 100644 --- a/compiler/testData/codegen/box/functions/kt1739.kt +++ b/compiler/testData/codegen/box/functions/kt1739.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: JS_IR // TODO: muted automatically, investigate should it be ran for JS or not // IGNORE_BACKEND: JS, NATIVE diff --git a/compiler/testData/codegen/box/functions/nothisnoclosure.kt b/compiler/testData/codegen/box/functions/nothisnoclosure.kt index fb43b6725c7..68369ae57eb 100644 --- a/compiler/testData/codegen/box/functions/nothisnoclosure.kt +++ b/compiler/testData/codegen/box/functions/nothisnoclosure.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR fun foo(x: Int) {} fun loop(times : Int) { diff --git a/compiler/testData/codegen/box/inference/lastExpressionOfLambdaWithNothingConstraint.kt b/compiler/testData/codegen/box/inference/lastExpressionOfLambdaWithNothingConstraint.kt index 7fa49e475b3..9f15e1dba03 100644 --- a/compiler/testData/codegen/box/inference/lastExpressionOfLambdaWithNothingConstraint.kt +++ b/compiler/testData/codegen/box/inference/lastExpressionOfLambdaWithNothingConstraint.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +NewInference -// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME inline fun foo(f: () -> T): String { diff --git a/compiler/testData/codegen/box/javaInterop/lambdaInstanceOf.kt b/compiler/testData/codegen/box/javaInterop/lambdaInstanceOf.kt index a29fe25a528..294d7a295b0 100644 --- a/compiler/testData/codegen/box/javaInterop/lambdaInstanceOf.kt +++ b/compiler/testData/codegen/box/javaInterop/lambdaInstanceOf.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/jvmField/capturePackageFields.kt b/compiler/testData/codegen/box/jvmField/capturePackageFields.kt index c80adee20e8..9c5ddfffe9c 100644 --- a/compiler/testData/codegen/box/jvmField/capturePackageFields.kt +++ b/compiler/testData/codegen/box/jvmField/capturePackageFields.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/jvmPackageName/rootPackage.kt b/compiler/testData/codegen/box/jvmPackageName/rootPackage.kt index 1af3466b511..9a2c21a959a 100644 --- a/compiler/testData/codegen/box/jvmPackageName/rootPackage.kt +++ b/compiler/testData/codegen/box/jvmPackageName/rootPackage.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/jvmPackageName/simple.kt b/compiler/testData/codegen/box/jvmPackageName/simple.kt index 98a9291e19f..aecccdb64cd 100644 --- a/compiler/testData/codegen/box/jvmPackageName/simple.kt +++ b/compiler/testData/codegen/box/jvmPackageName/simple.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/jvmPackageName/withJvmName.kt b/compiler/testData/codegen/box/jvmPackageName/withJvmName.kt index 33b8b40677f..ee9d09a4e98 100644 --- a/compiler/testData/codegen/box/jvmPackageName/withJvmName.kt +++ b/compiler/testData/codegen/box/jvmPackageName/withJvmName.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/localClasses/kt2873.kt b/compiler/testData/codegen/box/localClasses/kt2873.kt index 1045973a32d..be5008511ac 100644 --- a/compiler/testData/codegen/box/localClasses/kt2873.kt +++ b/compiler/testData/codegen/box/localClasses/kt2873.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR fun foo() : String { val u = { class B(val data : String) diff --git a/compiler/testData/codegen/box/multiDecl/ValCapturedInFunctionLiteral.kt b/compiler/testData/codegen/box/multiDecl/ValCapturedInFunctionLiteral.kt index 9cfa22de858..4bf9bdcd08c 100644 --- a/compiler/testData/codegen/box/multiDecl/ValCapturedInFunctionLiteral.kt +++ b/compiler/testData/codegen/box/multiDecl/ValCapturedInFunctionLiteral.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class A { operator fun component1() = 1 operator fun component2() = 2 diff --git a/compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForValCaptured.kt b/compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForValCaptured.kt index b0d77493b3b..4687822bb09 100644 --- a/compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForValCaptured.kt +++ b/compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForValCaptured.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class Range(val from : C, val to: C) { operator fun iterator() = It(from, to) } diff --git a/compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForValCaptured.kt b/compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForValCaptured.kt index 7ce68632e9c..b09acb4b8aa 100644 --- a/compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForValCaptured.kt +++ b/compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForValCaptured.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class Range(val from : C, val to: C) { operator fun iterator() = It(from, to) } diff --git a/compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentExtensionsValCaptured.kt b/compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentExtensionsValCaptured.kt index 5a2bd1b5c93..f1d711a42e2 100644 --- a/compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentExtensionsValCaptured.kt +++ b/compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentExtensionsValCaptured.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR operator fun Int.component1() = this + 1 operator fun Int.component2() = this + 2 diff --git a/compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentExtensionsValCaptured.kt b/compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentExtensionsValCaptured.kt index 83884801c10..fcb229e7f75 100644 --- a/compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentExtensionsValCaptured.kt +++ b/compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentExtensionsValCaptured.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR operator fun Long.component1() = this + 1 operator fun Long.component2() = this + 2 diff --git a/compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForValCaptured.kt b/compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForValCaptured.kt index ec681f42edc..8df7e251bf5 100644 --- a/compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForValCaptured.kt +++ b/compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForValCaptured.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class Range(val from : C, val to: C) { operator fun iterator() = It(from, to) } diff --git a/compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentExtensionsValCaptured.kt b/compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentExtensionsValCaptured.kt index 5a2bd1b5c93..f1d711a42e2 100644 --- a/compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentExtensionsValCaptured.kt +++ b/compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentExtensionsValCaptured.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR operator fun Int.component1() = this + 1 operator fun Int.component2() = this + 2 diff --git a/compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentExtensionsValCaptured.kt b/compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentExtensionsValCaptured.kt index 83884801c10..fcb229e7f75 100644 --- a/compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentExtensionsValCaptured.kt +++ b/compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentExtensionsValCaptured.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR operator fun Long.component1() = this + 1 operator fun Long.component2() = this + 2 diff --git a/compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentExtensionsValCaptured.kt b/compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentExtensionsValCaptured.kt index d783b2a800b..fd0f6dac885 100644 --- a/compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentExtensionsValCaptured.kt +++ b/compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentExtensionsValCaptured.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR operator fun Int.component1() = this + 1 operator fun Int.component2() = this + 2 diff --git a/compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentExtensionsValCaptured.kt b/compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentExtensionsValCaptured.kt index 818bd414eb1..8bf72ec08d7 100644 --- a/compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentExtensionsValCaptured.kt +++ b/compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentExtensionsValCaptured.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR operator fun Long.component1() = this + 1 operator fun Long.component2() = this + 2 diff --git a/compiler/testData/codegen/box/multifileClasses/inlineMultifileClassMemberFromOtherPackage.kt b/compiler/testData/codegen/box/multifileClasses/inlineMultifileClassMemberFromOtherPackage.kt index e31b8080700..8631b9ac874 100644 --- a/compiler/testData/codegen/box/multifileClasses/inlineMultifileClassMemberFromOtherPackage.kt +++ b/compiler/testData/codegen/box/multifileClasses/inlineMultifileClassMemberFromOtherPackage.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME // FILE: box.kt diff --git a/compiler/testData/codegen/box/multifileClasses/optimized/callInInlineLambda.kt b/compiler/testData/codegen/box/multifileClasses/optimized/callInInlineLambda.kt index 2b6209f18dd..6eaacfc3209 100644 --- a/compiler/testData/codegen/box/multifileClasses/optimized/callInInlineLambda.kt +++ b/compiler/testData/codegen/box/multifileClasses/optimized/callInInlineLambda.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // IGNORE_LIGHT_ANALYSIS // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/nullCheckOptimization/kt22410.kt b/compiler/testData/codegen/box/nullCheckOptimization/kt22410.kt index 90079a3f9a3..05c2ca4c594 100644 --- a/compiler/testData/codegen/box/nullCheckOptimization/kt22410.kt +++ b/compiler/testData/codegen/box/nullCheckOptimization/kt22410.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR fun box(): String { defineFunc() diff --git a/compiler/testData/codegen/box/objects/selfReferenceToObjectInLambdaInSuperConstructorCall.kt b/compiler/testData/codegen/box/objects/selfReferenceToObjectInLambdaInSuperConstructorCall.kt index b9bbb0f1e74..e12b6882c7d 100644 --- a/compiler/testData/codegen/box/objects/selfReferenceToObjectInLambdaInSuperConstructorCall.kt +++ b/compiler/testData/codegen/box/objects/selfReferenceToObjectInLambdaInSuperConstructorCall.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR abstract class Base(val fn: () -> String) object Test : Base({ Test.ok() }) { diff --git a/compiler/testData/codegen/box/package/privateTopLevelPropAndVarInInner.kt b/compiler/testData/codegen/box/package/privateTopLevelPropAndVarInInner.kt index 7a2845e1f8f..b61fd243ab9 100644 --- a/compiler/testData/codegen/box/package/privateTopLevelPropAndVarInInner.kt +++ b/compiler/testData/codegen/box/package/privateTopLevelPropAndVarInInner.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR private var x = "O" private fun f() = "K" diff --git a/compiler/testData/codegen/box/primitiveTypes/equalityWithObject/boxedEqPrimitiveEvaluationOrder.kt b/compiler/testData/codegen/box/primitiveTypes/equalityWithObject/boxedEqPrimitiveEvaluationOrder.kt index 118b9aa71d3..5fd58629899 100644 --- a/compiler/testData/codegen/box/primitiveTypes/equalityWithObject/boxedEqPrimitiveEvaluationOrder.kt +++ b/compiler/testData/codegen/box/primitiveTypes/equalityWithObject/boxedEqPrimitiveEvaluationOrder.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR var order: String = "" fun a(i: Int): Int? { diff --git a/compiler/testData/codegen/box/properties/fieldInsideLambda.kt b/compiler/testData/codegen/box/properties/fieldInsideLambda.kt index d7d5d051643..ebf3cb6cfb7 100644 --- a/compiler/testData/codegen/box/properties/fieldInsideLambda.kt +++ b/compiler/testData/codegen/box/properties/fieldInsideLambda.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR val my: String = "O" get() = { field }() + "K" diff --git a/compiler/testData/codegen/box/properties/kt1892.kt b/compiler/testData/codegen/box/properties/kt1892.kt index 34edbe6dc38..ae564c7fc93 100644 --- a/compiler/testData/codegen/box/properties/kt1892.kt +++ b/compiler/testData/codegen/box/properties/kt1892.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR val Int.ext: () -> Int get() = { 5 } val Long.ext: Long get() = 4.ext().toLong() //(c.kt:4) val y: Long get() = 10L.ext diff --git a/compiler/testData/codegen/box/properties/lateinit/local/capturedLocalLateinit.kt b/compiler/testData/codegen/box/properties/lateinit/local/capturedLocalLateinit.kt index 050fb02e433..e36155dfdb7 100644 --- a/compiler/testData/codegen/box/properties/lateinit/local/capturedLocalLateinit.kt +++ b/compiler/testData/codegen/box/properties/lateinit/local/capturedLocalLateinit.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR fun runNoInline(f: () -> Unit) = f() fun box(): String { diff --git a/compiler/testData/codegen/box/smartCasts/lambdaArgumentWithoutType.kt b/compiler/testData/codegen/box/smartCasts/lambdaArgumentWithoutType.kt index 25dd241dc6a..fc100a71664 100644 --- a/compiler/testData/codegen/box/smartCasts/lambdaArgumentWithoutType.kt +++ b/compiler/testData/codegen/box/smartCasts/lambdaArgumentWithoutType.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: JS_IR // TODO: muted automatically, investigate should it be ran for JS or not // IGNORE_BACKEND: JS diff --git a/compiler/testData/codegen/box/topLevelPrivate/syntheticAccessor.kt b/compiler/testData/codegen/box/topLevelPrivate/syntheticAccessor.kt index 4f98f4b2382..68d402f57bc 100644 --- a/compiler/testData/codegen/box/topLevelPrivate/syntheticAccessor.kt +++ b/compiler/testData/codegen/box/topLevelPrivate/syntheticAccessor.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR package test private val prop = "O" diff --git a/compiler/testData/codegen/box/topLevelPrivate/syntheticAccessorInMultiFile.kt b/compiler/testData/codegen/box/topLevelPrivate/syntheticAccessorInMultiFile.kt index 7ae294ded9a..c7c72020467 100644 --- a/compiler/testData/codegen/box/topLevelPrivate/syntheticAccessorInMultiFile.kt +++ b/compiler/testData/codegen/box/topLevelPrivate/syntheticAccessorInMultiFile.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/unit/closureReturnsNullableUnit.kt b/compiler/testData/codegen/box/unit/closureReturnsNullableUnit.kt index 01b67a141b8..604b35ab71f 100644 --- a/compiler/testData/codegen/box/unit/closureReturnsNullableUnit.kt +++ b/compiler/testData/codegen/box/unit/closureReturnsNullableUnit.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR fun isNull(x: Unit?) = x == null fun box(): String { diff --git a/compiler/testData/codegen/box/when/whenSubjectVariable/captureSubjectVariable.kt b/compiler/testData/codegen/box/when/whenSubjectVariable/captureSubjectVariable.kt index f7cbf6e8091..e49a259c80d 100644 --- a/compiler/testData/codegen/box/when/whenSubjectVariable/captureSubjectVariable.kt +++ b/compiler/testData/codegen/box/when/whenSubjectVariable/captureSubjectVariable.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +VariableDeclarationInWhenSubject -// IGNORE_BACKEND_FIR: JVM_IR fun box(): String { var y: String = "OK" diff --git a/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.fir.txt b/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.fir.txt index 36a1ec015fa..9584f97261f 100644 --- a/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.fir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.fir.txt @@ -25,7 +25,8 @@ FILE fqName: fileName:/delegateFieldWithAnnotations.kt initializer: FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Int BLOCK_BODY - CONST Int type=kotlin.Int value=42 + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Int declared in .test1$delegate' + CONST Int type=kotlin.Int value=42 FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Int correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [delegated,val] BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt b/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt index 14ef8736540..ca1a9e3933b 100644 --- a/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt +++ b/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt @@ -91,7 +91,8 @@ FILE fqName: fileName:/classLevelProperties.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($this:.C) returnType:kotlin.Int $this: VALUE_PARAMETER name: type:.C BLOCK_BODY - CONST Int type=kotlin.Int value=42 + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Int declared in .C.test7$delegate' + CONST Int type=kotlin.Int value=42 FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.C) returnType:kotlin.Int correspondingProperty: PROPERTY name:test7 visibility:public modality:FINAL [delegated,val] $this: VALUE_PARAMETER name: type:.C diff --git a/compiler/testData/ir/irText/declarations/delegatedProperties.fir.txt b/compiler/testData/ir/irText/declarations/delegatedProperties.fir.txt index f0b5c991d4d..71693eff27f 100644 --- a/compiler/testData/ir/irText/declarations/delegatedProperties.fir.txt +++ b/compiler/testData/ir/irText/declarations/delegatedProperties.fir.txt @@ -7,7 +7,8 @@ FILE fqName: fileName:/delegatedProperties.kt initializer: FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Int BLOCK_BODY - CONST Int type=kotlin.Int value=42 + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Int declared in .test1$delegate' + CONST Int type=kotlin.Int value=42 FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Int correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [delegated,val] BLOCK_BODY @@ -44,7 +45,8 @@ FILE fqName: fileName:/delegatedProperties.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($this:.C) returnType:kotlin.Int $this: VALUE_PARAMETER name: type:.C BLOCK_BODY - CONST Int type=kotlin.Int value=42 + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Int declared in .C.test2$delegate' + CONST Int type=kotlin.Int value=42 FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.C) returnType:kotlin.Int correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [delegated,val] $this: VALUE_PARAMETER name: type:.C diff --git a/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.txt b/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.txt index 603cd9283ed..db2b414e403 100644 --- a/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.txt +++ b/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.txt @@ -70,7 +70,8 @@ FILE fqName: fileName:/packageLevelProperties.kt initializer: FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Int BLOCK_BODY - CONST Int type=kotlin.Int value=42 + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Int declared in .test7$delegate' + CONST Int type=kotlin.Int value=42 FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Int correspondingProperty: PROPERTY name:test7 visibility:public modality:FINAL [delegated,val] BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/parameters/lambdas.fir.txt b/compiler/testData/ir/irText/declarations/parameters/lambdas.fir.txt index 5bad310fee6..8c6a7310181 100644 --- a/compiler/testData/ir/irText/declarations/parameters/lambdas.fir.txt +++ b/compiler/testData/ir/irText/declarations/parameters/lambdas.fir.txt @@ -6,7 +6,8 @@ FILE fqName: fileName:/lambdas.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.String) returnType:kotlin.String VALUE_PARAMETER name:it index:0 type:kotlin.String BLOCK_BODY - GET_VAR 'it: kotlin.String declared in .test1.' type=kotlin.String origin=null + RETURN type=kotlin.Nothing from='local final fun (it: kotlin.String): kotlin.String declared in .test1' + GET_VAR 'it: kotlin.String declared in .test1.' type=kotlin.String origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function1 correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [val] BLOCK_BODY @@ -20,8 +21,9 @@ FILE fqName: fileName:/lambdas.kt $receiver: VALUE_PARAMETER name: type:kotlin.Any VALUE_PARAMETER name:it index:0 type:kotlin.Any BLOCK_BODY - CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null - $this: GET_VAR 'it: kotlin.Any declared in .test2.' type=kotlin.Any origin=null + RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Any): kotlin.Int declared in .test2' + CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null + $this: GET_VAR 'it: kotlin.Any declared in .test2.' type=kotlin.Any origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function2 correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val] BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/parameters/useNextParamInLambda.fir.txt b/compiler/testData/ir/irText/declarations/parameters/useNextParamInLambda.fir.txt index eb4b1eb7c9b..b003dbdbafe 100644 --- a/compiler/testData/ir/irText/declarations/parameters/useNextParamInLambda.fir.txt +++ b/compiler/testData/ir/irText/declarations/parameters/useNextParamInLambda.fir.txt @@ -5,16 +5,18 @@ FILE fqName: fileName:/useNextParamInLambda.kt FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:IrErrorType BLOCK_BODY - ERROR_CALL 'Unresolved reference: #' type=IrErrorType + RETURN type=kotlin.Nothing from='local final fun (): IrErrorType declared in .f' + ERROR_CALL 'Unresolved reference: #' type=IrErrorType VALUE_PARAMETER name:f2 index:1 type:kotlin.Function0 EXPRESSION_BODY FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String BLOCK_BODY - CONST String type=kotlin.String value="FAIL" + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .f' + CONST String type=kotlin.String value="FAIL" BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun f (f1: kotlin.Function0, f2: kotlin.Function0): kotlin.String declared in ' - CALL 'public abstract fun invoke (): kotlin.String [operator] declared in kotlin.Function0' type=kotlin.String origin=null + CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.String origin=INVOKE $this: GET_VAR 'f1: kotlin.Function0 declared in .f' type=kotlin.Function0 origin=null FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String BLOCK_BODY @@ -33,9 +35,11 @@ FILE fqName: fileName:/useNextParamInLambda.kt f1: FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String BLOCK_BODY - CONST String type=kotlin.String value="O" + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box' + CONST String type=kotlin.String value="O" other: CALL 'public final fun f (f1: kotlin.Function0, f2: kotlin.Function0): kotlin.String declared in ' type=kotlin.String origin=null f1: FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String BLOCK_BODY - CONST String type=kotlin.String value="K" + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box' + CONST String type=kotlin.String value="K" diff --git a/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.fir.txt b/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.fir.txt index 61aedcee00f..4e06d063fe7 100644 --- a/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.fir.txt +++ b/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.fir.txt @@ -47,6 +47,6 @@ FILE fqName: fileName:/augmentedAssignmentWithExpression.kt VALUE_PARAMETER name:a index:0 type:kotlin.Function0<.Host> BLOCK_BODY CALL 'public final fun plusAssign (x: kotlin.Int): kotlin.Unit [operator] declared in .Host' type=kotlin.Unit origin=null - $this: CALL 'public abstract fun invoke (): .Host [operator] declared in kotlin.Function0' type=.Host origin=null + $this: CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=.Host origin=INVOKE $this: GET_VAR 'a: kotlin.Function0<.Host> declared in .test4' type=kotlin.Function0<.Host> origin=null x: CONST Int type=kotlin.Int value=1 diff --git a/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.txt b/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.txt index 909d001a47d..400b10c374b 100644 --- a/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.txt +++ b/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.txt @@ -8,7 +8,8 @@ FILE fqName: fileName:/breakContinueInWhen.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (i:kotlin.Int) returnType:kotlin.Int VALUE_PARAMETER name:i index:0 type:kotlin.Int BLOCK_BODY - GET_VAR 'i: kotlin.Int declared in .testBreakFor.' type=kotlin.Int origin=null + RETURN type=kotlin.Nothing from='local final fun (i: kotlin.Int): kotlin.Int declared in .testBreakFor' + GET_VAR 'i: kotlin.Int declared in .testBreakFor.' type=kotlin.Int origin=null VAR name:k type:kotlin.Int [var] CONST Int type=kotlin.Int value=0 VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.IntArray [val] @@ -66,7 +67,8 @@ FILE fqName: fileName:/breakContinueInWhen.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (i:kotlin.Int) returnType:kotlin.Int VALUE_PARAMETER name:i index:0 type:kotlin.Int BLOCK_BODY - GET_VAR 'i: kotlin.Int declared in .testContinueFor.' type=kotlin.Int origin=null + RETURN type=kotlin.Nothing from='local final fun (i: kotlin.Int): kotlin.Int declared in .testContinueFor' + GET_VAR 'i: kotlin.Int declared in .testContinueFor.' type=kotlin.Int origin=null VAR name:k type:kotlin.Int [var] CONST Int type=kotlin.Int value=0 VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.IntArray [val] diff --git a/compiler/testData/ir/irText/expressions/callableReferences/boundInnerGenericConstructor.fir.txt b/compiler/testData/ir/irText/expressions/callableReferences/boundInnerGenericConstructor.fir.txt index 2ecab187eaa..7cfd621e305 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/boundInnerGenericConstructor.fir.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/boundInnerGenericConstructor.fir.txt @@ -71,7 +71,7 @@ FILE fqName:test fileName:/boundInnerGenericConstructor.kt VALUE_PARAMETER name:x index:2 type:kotlin.Function2> BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun foo (a: A of test.foo, b: B of test.foo, x: kotlin.Function2>): test.Foo.Inner [inline] declared in test' - CALL 'public abstract fun invoke (p1: A of test.foo, p2: B of test.foo): test.Foo.Inner [operator] declared in kotlin.Function2' type=test.Foo.Inner origin=null + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function2, p2: P2 of kotlin.Function2): R of kotlin.Function2 [operator] declared in kotlin.Function2' type=test.Foo.Inner origin=INVOKE $this: GET_VAR 'x: kotlin.Function2> declared in test.foo' type=kotlin.Function2> origin=null p1: GET_VAR 'a: A of test.foo declared in test.foo' type=A of test.foo origin=null p2: GET_VAR 'b: B of test.foo declared in test.foo' type=B of test.foo origin=null diff --git a/compiler/testData/ir/irText/expressions/callableReferences/constructorWithAdaptedArguments.fir.txt b/compiler/testData/ir/irText/expressions/callableReferences/constructorWithAdaptedArguments.fir.txt index a010a63cae6..d314a5c5a1d 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/constructorWithAdaptedArguments.fir.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/constructorWithAdaptedArguments.fir.txt @@ -3,7 +3,7 @@ FILE fqName: fileName:/constructorWithAdaptedArguments.kt VALUE_PARAMETER name:fn index:0 type:kotlin.Function1 BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun use (fn: kotlin.Function1): kotlin.Any declared in ' - CALL 'public abstract fun invoke (p1: kotlin.Int): kotlin.Any [operator] declared in kotlin.Function1' type=kotlin.Any origin=null + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Any origin=INVOKE $this: GET_VAR 'fn: kotlin.Function1 declared in .use' type=kotlin.Function1 origin=null p1: CONST Int type=kotlin.Int value=42 CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any] diff --git a/compiler/testData/ir/irText/expressions/callableReferences/withAdaptedArguments.fir.txt b/compiler/testData/ir/irText/expressions/callableReferences/withAdaptedArguments.fir.txt index 2c7dba5c113..b81735563b2 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/withAdaptedArguments.fir.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/withAdaptedArguments.fir.txt @@ -3,7 +3,7 @@ FILE fqName: fileName:/withAdaptedArguments.kt VALUE_PARAMETER name:fn index:0 type:kotlin.Function1 BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun use (fn: kotlin.Function1): kotlin.String declared in ' - CALL 'public abstract fun invoke (p1: kotlin.Int): kotlin.String [operator] declared in kotlin.Function1' type=kotlin.String origin=null + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.String origin=INVOKE $this: GET_VAR 'fn: kotlin.Function1 declared in .use' type=kotlin.Function1 origin=null p1: CONST Int type=kotlin.Int value=1 FUN name:coerceToUnit visibility:public modality:FINAL <> (fn:kotlin.Function1) returnType:kotlin.Unit diff --git a/compiler/testData/ir/irText/expressions/callableReferences/withArgumentAdaptationAndReceiver.fir.txt b/compiler/testData/ir/irText/expressions/callableReferences/withArgumentAdaptationAndReceiver.fir.txt index 4d17bdae85a..509ab5e1e25 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/withArgumentAdaptationAndReceiver.fir.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/withArgumentAdaptationAndReceiver.fir.txt @@ -2,7 +2,7 @@ FILE fqName: fileName:/withArgumentAdaptationAndReceiver.kt FUN name:use visibility:public modality:FINAL <> (fn:kotlin.Function1) returnType:kotlin.Unit VALUE_PARAMETER name:fn index:0 type:kotlin.Function1 BLOCK_BODY - CALL 'public abstract fun invoke (p1: kotlin.Int): kotlin.Unit [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=INVOKE $this: GET_VAR 'fn: kotlin.Function1 declared in .use' type=kotlin.Function1 origin=null p1: CONST Int type=kotlin.Int value=1 CLASS CLASS name:Host modality:FINAL visibility:public superTypes:[kotlin.Any] diff --git a/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.fir.txt b/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.fir.txt index a312ac42fc7..3f25c64c7d0 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.fir.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.fir.txt @@ -36,10 +36,11 @@ FILE fqName: fileName:/withVarargViewedAsArray.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.Int) returnType:kotlin.Int VALUE_PARAMETER name:it index:0 type:kotlin.Int BLOCK_BODY - CALL 'public abstract fun toInt (): kotlin.Int declared in kotlin.Number' type=kotlin.Int origin=null - $this: CALL 'public final fun get (index: kotlin.Int): kotlin.Number [operator] declared in kotlin.Array' type=kotlin.Number origin=null - $this: GET_VAR 'args: kotlin.Array [vararg] declared in .nsum' type=kotlin.Array origin=null - index: GET_VAR 'it: kotlin.Int declared in .nsum.' type=kotlin.Int origin=null + RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Int): kotlin.Int declared in .nsum' + CALL 'public abstract fun toInt (): kotlin.Int declared in kotlin.Number' type=kotlin.Int origin=null + $this: CALL 'public final fun get (index: kotlin.Int): kotlin.Number [operator] declared in kotlin.Array' type=kotlin.Number origin=null + $this: GET_VAR 'args: kotlin.Array [vararg] declared in .nsum' type=kotlin.Array origin=null + index: GET_VAR 'it: kotlin.Int declared in .nsum.' type=kotlin.Int origin=null FUN name:zap visibility:public modality:FINAL <> (b:kotlin.Array, k:kotlin.Int) returnType:kotlin.Unit VALUE_PARAMETER name:b index:0 type:kotlin.Array varargElementType:kotlin.String [vararg] VALUE_PARAMETER name:k index:1 type:kotlin.Int diff --git a/compiler/testData/ir/irText/expressions/catchParameterAccess.fir.txt b/compiler/testData/ir/irText/expressions/catchParameterAccess.fir.txt index 22b71e3c561..5ef7bd50035 100644 --- a/compiler/testData/ir/irText/expressions/catchParameterAccess.fir.txt +++ b/compiler/testData/ir/irText/expressions/catchParameterAccess.fir.txt @@ -4,7 +4,7 @@ FILE fqName: fileName:/catchParameterAccess.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test (f: kotlin.Function0): kotlin.Unit declared in ' TRY type=kotlin.Unit - try: CALL 'public abstract fun invoke (): kotlin.Unit [operator] declared in kotlin.Function0' type=kotlin.Unit origin=null + try: CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Unit origin=INVOKE $this: GET_VAR 'f: kotlin.Function0 declared in .test' type=kotlin.Function0 origin=null CATCH parameter=val e: java.lang.Exception [val] declared in .test VAR name:e type:java.lang.Exception [val] diff --git a/compiler/testData/ir/irText/expressions/coercionToUnit.fir.txt b/compiler/testData/ir/irText/expressions/coercionToUnit.fir.txt index e69656cc86c..6425e6e3286 100644 --- a/compiler/testData/ir/irText/expressions/coercionToUnit.fir.txt +++ b/compiler/testData/ir/irText/expressions/coercionToUnit.fir.txt @@ -5,7 +5,8 @@ FILE fqName: fileName:/coercionToUnit.kt FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Int BLOCK_BODY - CONST Int type=kotlin.Int value=42 + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Int declared in .test1' + CONST Int type=kotlin.Int value=42 FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function0 correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [val] BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.fir.txt b/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.fir.txt index 3a450ab4e27..5b6757c6a58 100644 --- a/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.fir.txt +++ b/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.fir.txt @@ -30,8 +30,9 @@ FILE fqName: fileName:/enumEntryAsReceiver.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($this:.X.B) returnType:kotlin.String $this: VALUE_PARAMETER name: type:.X.B BLOCK_BODY - CALL 'public final fun (): kotlin.String declared in .X.B' type=kotlin.String origin=null - $this: GET_VAR ': . declared in .' type=. origin=null + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .X.B.value' + CALL 'public final fun (): kotlin.String declared in .X.B' type=kotlin.String origin=null + $this: GET_VAR ': . declared in .' type=. origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.X.B) returnType:kotlin.Function0 correspondingProperty: PROPERTY name:value visibility:public modality:FINAL [val] $this: VALUE_PARAMETER name: type:.X.B @@ -87,6 +88,6 @@ FILE fqName: fileName:/enumEntryAsReceiver.kt FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' - CALL 'public abstract fun invoke (): kotlin.String [operator] declared in kotlin.Function0' type=kotlin.String origin=null + CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.String origin=INVOKE $this: CALL 'public abstract fun (): kotlin.Function0 declared in .X' type=kotlin.Function0 origin=null $this: GET_ENUM 'ENUM_ENTRY name:B' type=.X diff --git a/compiler/testData/ir/irText/expressions/extFunInvokeAsFun.fir.txt b/compiler/testData/ir/irText/expressions/extFunInvokeAsFun.fir.txt index e1a41aae4f9..8460502274a 100644 --- a/compiler/testData/ir/irText/expressions/extFunInvokeAsFun.fir.txt +++ b/compiler/testData/ir/irText/expressions/extFunInvokeAsFun.fir.txt @@ -4,7 +4,7 @@ FILE fqName: fileName:/extFunInvokeAsFun.kt VALUE_PARAMETER name:block index:1 type:kotlin.Function1 BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun with1 (receiver: kotlin.Any?, block: kotlin.Function1): kotlin.Unit declared in ' - CALL 'public abstract fun invoke (p1: kotlin.Any?): kotlin.Unit [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=INVOKE $this: GET_VAR 'block: kotlin.Function1 declared in .with1' type=kotlin.Function1 origin=null p1: GET_VAR 'receiver: kotlin.Any? declared in .with1' type=kotlin.Any? origin=null FUN name:with2 visibility:public modality:FINAL <> (receiver:kotlin.Any?, block:kotlin.Function1) returnType:kotlin.Unit @@ -12,6 +12,6 @@ FILE fqName: fileName:/extFunInvokeAsFun.kt VALUE_PARAMETER name:block index:1 type:kotlin.Function1 BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun with2 (receiver: kotlin.Any?, block: kotlin.Function1): kotlin.Unit declared in ' - CALL 'public abstract fun invoke (p1: kotlin.Any?): kotlin.Unit [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=INVOKE $this: GET_VAR 'block: kotlin.Function1 declared in .with2' type=kotlin.Function1 origin=null p1: GET_VAR 'receiver: kotlin.Any? declared in .with2' type=kotlin.Any? origin=null diff --git a/compiler/testData/ir/irText/expressions/funInterface/basicFunInterfaceConversion.fir.txt b/compiler/testData/ir/irText/expressions/funInterface/basicFunInterfaceConversion.fir.txt index c31b6c40da7..e13ace076c9 100644 --- a/compiler/testData/ir/irText/expressions/funInterface/basicFunInterfaceConversion.fir.txt +++ b/compiler/testData/ir/irText/expressions/funInterface/basicFunInterfaceConversion.fir.txt @@ -29,4 +29,5 @@ FILE fqName: fileName:/basicFunInterfaceConversion.kt f: FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String BLOCK_BODY - CONST String type=kotlin.String value="OK" + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .test' + CONST String type=kotlin.String value="OK" diff --git a/compiler/testData/ir/irText/expressions/funInterface/partialSam.fir.txt b/compiler/testData/ir/irText/expressions/funInterface/partialSam.fir.txt index 722e3808df3..f5e9ff971a1 100644 --- a/compiler/testData/ir/irText/expressions/funInterface/partialSam.fir.txt +++ b/compiler/testData/ir/irText/expressions/funInterface/partialSam.fir.txt @@ -115,7 +115,8 @@ FILE fqName: fileName:/partialSam.kt VALUE_PARAMETER name:i index:1 type:kotlin.Int VALUE_PARAMETER name:ti index:2 type:kotlin.Int BLOCK_BODY - CONST String type=kotlin.String value="" + RETURN type=kotlin.Nothing from='local final fun (s: kotlin.String, i: kotlin.Int, ti: kotlin.Int): kotlin.String declared in .test' + CONST String type=kotlin.String value="" CALL 'public final fun runConversion (f1: .Fn, f2: .Fn): kotlin.Int declared in .J' type=kotlin.Int origin=null $this: GET_VAR 'j: .J declared in .test' type=.J origin=null f1: FUN_EXPR type=kotlin.Function3 origin=LAMBDA @@ -124,5 +125,6 @@ FILE fqName: fileName:/partialSam.kt VALUE_PARAMETER name:i index:1 type:kotlin.Int VALUE_PARAMETER name:ts index:2 type:kotlin.String BLOCK_BODY - CONST Int type=kotlin.Int value=1 + RETURN type=kotlin.Nothing from='local final fun (s: kotlin.String, i: kotlin.Int, ts: kotlin.String): kotlin.Int declared in .test' + CONST Int type=kotlin.Int value=1 f2: CALL 'public final fun (): . declared in ' type=. origin=null diff --git a/compiler/testData/ir/irText/expressions/genericConstructorCallWithTypeArguments.fir.txt b/compiler/testData/ir/irText/expressions/genericConstructorCallWithTypeArguments.fir.txt index 856858f9821..8281533fe26 100644 --- a/compiler/testData/ir/irText/expressions/genericConstructorCallWithTypeArguments.fir.txt +++ b/compiler/testData/ir/irText/expressions/genericConstructorCallWithTypeArguments.fir.txt @@ -20,8 +20,9 @@ FILE fqName: fileName:/genericConstructorCallWithTypeArguments.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.Int) returnType:T of .testArray VALUE_PARAMETER name:it index:0 type:kotlin.Int BLOCK_BODY - CALL 'public abstract fun invoke (): T of .testArray [operator] declared in kotlin.Function0' type=T of .testArray origin=null - $this: GET_VAR 'block: kotlin.Function0.testArray> [crossinline] declared in .testArray' type=kotlin.Function0.testArray> origin=null + RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Int): T of .testArray declared in .testArray' + CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of .testArray origin=INVOKE + $this: GET_VAR 'block: kotlin.Function0.testArray> [crossinline] declared in .testArray' type=kotlin.Function0.testArray> origin=null CLASS CLASS name:Box modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Box TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] diff --git a/compiler/testData/ir/irText/expressions/implicitCastToNonNull.fir.txt b/compiler/testData/ir/irText/expressions/implicitCastToNonNull.fir.txt index 311a605fdae..de1f3d542a6 100644 --- a/compiler/testData/ir/irText/expressions/implicitCastToNonNull.fir.txt +++ b/compiler/testData/ir/irText/expressions/implicitCastToNonNull.fir.txt @@ -71,6 +71,6 @@ FILE fqName: fileName:/implicitCastToNonNull.kt $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ arg0: GET_VAR 'x: T of .test5 declared in .test5' type=T of .test5 origin=null arg1: CONST Null type=kotlin.Nothing? value=null - then: CALL 'public abstract fun invoke (p1: S of .test5): kotlin.Unit [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null + then: CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=INVOKE $this: GET_VAR 'fn: kotlin.Function1.test5, kotlin.Unit> declared in .test5' type=kotlin.Function1.test5, kotlin.Unit> origin=null p1: GET_VAR 'x: T of .test5 declared in .test5' type=T of .test5 origin=null diff --git a/compiler/testData/ir/irText/expressions/nullCheckOnGenericLambdaReturn.fir.txt b/compiler/testData/ir/irText/expressions/nullCheckOnGenericLambdaReturn.fir.txt index 291568f5eaa..dd2c16be486 100644 --- a/compiler/testData/ir/irText/expressions/nullCheckOnGenericLambdaReturn.fir.txt +++ b/compiler/testData/ir/irText/expressions/nullCheckOnGenericLambdaReturn.fir.txt @@ -3,27 +3,27 @@ FILE fqName: fileName:/nullCheckOnGenericLambdaReturn.kt VALUE_PARAMETER name:fn index:0 type:kotlin.Function0 BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun checkAny (fn: kotlin.Function0): kotlin.Any declared in ' - CALL 'public abstract fun invoke (): kotlin.Any [operator] declared in kotlin.Function0' type=kotlin.Any origin=null + CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Any origin=INVOKE $this: GET_VAR 'fn: kotlin.Function0 declared in .checkAny' type=kotlin.Function0 origin=null FUN name:checkAnyN visibility:public modality:FINAL <> (fn:kotlin.Function0) returnType:kotlin.Any? VALUE_PARAMETER name:fn index:0 type:kotlin.Function0 BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun checkAnyN (fn: kotlin.Function0): kotlin.Any? declared in ' - CALL 'public abstract fun invoke (): kotlin.Any? [operator] declared in kotlin.Function0' type=kotlin.Any? origin=null + CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Any? origin=INVOKE $this: GET_VAR 'fn: kotlin.Function0 declared in .checkAnyN' type=kotlin.Function0 origin=null FUN name:checkT visibility:public modality:FINAL (fn:kotlin.Function0.checkT>) returnType:T of .checkT TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] VALUE_PARAMETER name:fn index:0 type:kotlin.Function0.checkT> BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun checkT (fn: kotlin.Function0.checkT>): T of .checkT declared in ' - CALL 'public abstract fun invoke (): T of .checkT [operator] declared in kotlin.Function0' type=T of .checkT origin=null + CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of .checkT origin=INVOKE $this: GET_VAR 'fn: kotlin.Function0.checkT> declared in .checkT' type=kotlin.Function0.checkT> origin=null FUN name:checkTAny visibility:public modality:FINAL (fn:kotlin.Function0.checkTAny>) returnType:T of .checkTAny TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any] VALUE_PARAMETER name:fn index:0 type:kotlin.Function0.checkTAny> BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun checkTAny (fn: kotlin.Function0.checkTAny>): T of .checkTAny declared in ' - CALL 'public abstract fun invoke (): T of .checkTAny [operator] declared in kotlin.Function0' type=T of .checkTAny origin=null + CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of .checkTAny origin=INVOKE $this: GET_VAR 'fn: kotlin.Function0.checkTAny> declared in .checkTAny' type=kotlin.Function0.checkTAny> origin=null FUN name:id visibility:public modality:FINAL (x:T of .id) returnType:T of .id TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] @@ -39,7 +39,8 @@ FILE fqName: fileName:/nullCheckOnGenericLambdaReturn.kt fn: FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String? BLOCK_BODY - CALL 'public open fun foo (): kotlin.String? [operator] declared in .J' type=kotlin.String? origin=null + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String? declared in .test1' + CALL 'public open fun foo (): kotlin.String? [operator] declared in .J' type=kotlin.String? origin=null FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test2 (): kotlin.String declared in ' @@ -48,7 +49,8 @@ FILE fqName: fileName:/nullCheckOnGenericLambdaReturn.kt fn: FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String BLOCK_BODY - CALL 'public open fun nnFoo (): kotlin.String [operator] declared in .J' type=kotlin.String origin=null + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .test2' + CALL 'public open fun nnFoo (): kotlin.String [operator] declared in .J' type=kotlin.String origin=null FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.String? BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test3 (): kotlin.String? declared in ' @@ -57,7 +59,8 @@ FILE fqName: fileName:/nullCheckOnGenericLambdaReturn.kt fn: FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String? BLOCK_BODY - CALL 'public open fun foo (): kotlin.String? [operator] declared in .J' type=kotlin.String? origin=null + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String? declared in .test3' + CALL 'public open fun foo (): kotlin.String? [operator] declared in .J' type=kotlin.String? origin=null FUN name:test4 visibility:public modality:FINAL <> () returnType:kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test4 (): kotlin.String declared in ' @@ -66,4 +69,5 @@ FILE fqName: fileName:/nullCheckOnGenericLambdaReturn.kt fn: FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String BLOCK_BODY - CALL 'public open fun nnFoo (): kotlin.String [operator] declared in .J' type=kotlin.String origin=null + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .test4' + CALL 'public open fun nnFoo (): kotlin.String [operator] declared in .J' type=kotlin.String origin=null diff --git a/compiler/testData/ir/irText/expressions/nullCheckOnLambdaReturn.fir.txt b/compiler/testData/ir/irText/expressions/nullCheckOnLambdaReturn.fir.txt index 3ca8cbc972e..990e50594a1 100644 --- a/compiler/testData/ir/irText/expressions/nullCheckOnLambdaReturn.fir.txt +++ b/compiler/testData/ir/irText/expressions/nullCheckOnLambdaReturn.fir.txt @@ -3,13 +3,13 @@ FILE fqName: fileName:/nullCheckOnLambdaReturn.kt VALUE_PARAMETER name:fn index:0 type:kotlin.Function0 BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun checkAny (fn: kotlin.Function0): kotlin.Any declared in ' - CALL 'public abstract fun invoke (): kotlin.Any [operator] declared in kotlin.Function0' type=kotlin.Any origin=null + CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Any origin=INVOKE $this: GET_VAR 'fn: kotlin.Function0 declared in .checkAny' type=kotlin.Function0 origin=null FUN name:checkAnyN visibility:public modality:FINAL <> (fn:kotlin.Function0) returnType:kotlin.Any? VALUE_PARAMETER name:fn index:0 type:kotlin.Function0 BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun checkAnyN (fn: kotlin.Function0): kotlin.Any? declared in ' - CALL 'public abstract fun invoke (): kotlin.Any? [operator] declared in kotlin.Function0' type=kotlin.Any? origin=null + CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Any? origin=INVOKE $this: GET_VAR 'fn: kotlin.Function0 declared in .checkAnyN' type=kotlin.Function0 origin=null FUN name:id visibility:public modality:FINAL (x:T of .id) returnType:T of .id TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] @@ -24,14 +24,16 @@ FILE fqName: fileName:/nullCheckOnLambdaReturn.kt fn: FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Any BLOCK_BODY - CALL 'public open fun foo (): kotlin.String? [operator] declared in .J' type=kotlin.String? origin=null + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Any declared in .test1' + CALL 'public open fun foo (): kotlin.String? [operator] declared in .J' type=kotlin.String? origin=null PROPERTY name:test2 visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.Function0 visibility:private [final,static] EXPRESSION_BODY FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String? BLOCK_BODY - CALL 'public open fun foo (): kotlin.String? [operator] declared in .J' type=kotlin.String? origin=null + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String? declared in .test2' + CALL 'public open fun foo (): kotlin.String? [operator] declared in .J' type=kotlin.String? origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function0 correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val] BLOCK_BODY @@ -44,7 +46,8 @@ FILE fqName: fileName:/nullCheckOnLambdaReturn.kt FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String? BLOCK_BODY - CALL 'public open fun foo (): kotlin.String? [operator] declared in .J' type=kotlin.String? origin=null + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String? declared in .test3' + CALL 'public open fun foo (): kotlin.String? [operator] declared in .J' type=kotlin.String? origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function0 correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL [val] BLOCK_BODY @@ -58,7 +61,8 @@ FILE fqName: fileName:/nullCheckOnLambdaReturn.kt x: FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String? BLOCK_BODY - CALL 'public open fun foo (): kotlin.String? [operator] declared in .J' type=kotlin.String? origin=null + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String? declared in .test4' + CALL 'public open fun foo (): kotlin.String? [operator] declared in .J' type=kotlin.String? origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function0 correspondingProperty: PROPERTY name:test4 visibility:public modality:FINAL [val] BLOCK_BODY @@ -71,7 +75,8 @@ FILE fqName: fileName:/nullCheckOnLambdaReturn.kt fn: FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Any? BLOCK_BODY - CALL 'public open fun foo (): kotlin.String? [operator] declared in .J' type=kotlin.String? origin=null + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Any? declared in .test5' + CALL 'public open fun foo (): kotlin.String? [operator] declared in .J' type=kotlin.String? origin=null FUN name:test6 visibility:public modality:FINAL <> () returnType:kotlin.Any? BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test6 (): kotlin.Any? declared in ' @@ -79,4 +84,5 @@ FILE fqName: fileName:/nullCheckOnLambdaReturn.kt fn: FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Any? BLOCK_BODY - CALL 'public open fun nnFoo (): kotlin.String [operator] declared in .J' type=kotlin.String origin=null + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Any? declared in .test6' + CALL 'public open fun nnFoo (): kotlin.String [operator] declared in .J' type=kotlin.String origin=null diff --git a/compiler/testData/ir/irText/expressions/objectReferenceInClosureInSuperConstructorCall.fir.txt b/compiler/testData/ir/irText/expressions/objectReferenceInClosureInSuperConstructorCall.fir.txt index 1430a1b49fe..44064a48c47 100644 --- a/compiler/testData/ir/irText/expressions/objectReferenceInClosureInSuperConstructorCall.fir.txt +++ b/compiler/testData/ir/irText/expressions/objectReferenceInClosureInSuperConstructorCall.fir.txt @@ -38,7 +38,8 @@ FILE fqName: fileName:/objectReferenceInClosureInSuperConstructorCall.kt lambda: FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Any BLOCK_BODY - GET_OBJECT 'CLASS OBJECT name:Test modality:FINAL visibility:public superTypes:[.Base]' type=.Test + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Any declared in .Test.' + GET_OBJECT 'CLASS OBJECT name:Test modality:FINAL visibility:public superTypes:[.Base]' type=.Test INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:Test modality:FINAL visibility:public superTypes:[.Base]' PROPERTY FAKE_OVERRIDE name:lambda visibility:public modality:FINAL [fake_override,val] FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.Test) returnType:kotlin.Function0 [fake_override] diff --git a/compiler/testData/ir/irText/expressions/sam/samByProjectedType.fir.txt b/compiler/testData/ir/irText/expressions/sam/samByProjectedType.fir.txt index 244c77590ef..954101e48bb 100644 --- a/compiler/testData/ir/irText/expressions/sam/samByProjectedType.fir.txt +++ b/compiler/testData/ir/irText/expressions/sam/samByProjectedType.fir.txt @@ -6,4 +6,5 @@ FILE fqName: fileName:/samByProjectedType.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (x:kotlin.Any) returnType:kotlin.Any VALUE_PARAMETER name:x index:0 type:kotlin.Any BLOCK_BODY - GET_VAR 'x: kotlin.Any declared in .test1.' type=kotlin.Any origin=null + RETURN type=kotlin.Nothing from='local final fun (x: kotlin.Any): kotlin.Any declared in .test1' + GET_VAR 'x: kotlin.Any declared in .test1.' type=kotlin.Any origin=null diff --git a/compiler/testData/ir/irText/expressions/sam/samConstructors.fir.txt b/compiler/testData/ir/irText/expressions/sam/samConstructors.fir.txt index e0224913459..3b54c4d655b 100644 --- a/compiler/testData/ir/irText/expressions/sam/samConstructors.fir.txt +++ b/compiler/testData/ir/irText/expressions/sam/samConstructors.fir.txt @@ -30,6 +30,7 @@ FILE fqName: fileName:/samConstructors.kt VALUE_PARAMETER name:a index:0 type:kotlin.Int VALUE_PARAMETER name:b index:1 type:kotlin.Int BLOCK_BODY - CALL 'public final fun minus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'a: kotlin.Int declared in .test4.' type=kotlin.Int origin=null - other: GET_VAR 'b: kotlin.Int declared in .test4.' type=kotlin.Int origin=null + RETURN type=kotlin.Nothing from='local final fun (a: kotlin.Int, b: kotlin.Int): kotlin.Int declared in .test4' + CALL 'public final fun minus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null + $this: GET_VAR 'a: kotlin.Int declared in .test4.' type=kotlin.Int origin=null + other: GET_VAR 'b: kotlin.Int declared in .test4.' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/expressions/sam/samConversionToGeneric.fir.txt b/compiler/testData/ir/irText/expressions/sam/samConversionToGeneric.fir.txt index 8612886ffff..63b0c01f090 100644 --- a/compiler/testData/ir/irText/expressions/sam/samConversionToGeneric.fir.txt +++ b/compiler/testData/ir/irText/expressions/sam/samConversionToGeneric.fir.txt @@ -8,7 +8,8 @@ FILE fqName: fileName:/samConversionToGeneric.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (x:kotlin.String) returnType:kotlin.String VALUE_PARAMETER name:x index:0 type:kotlin.String BLOCK_BODY - GET_VAR 'x: kotlin.String declared in .test1.' type=kotlin.String origin=null + RETURN type=kotlin.Nothing from='local final fun (x: kotlin.String): kotlin.String declared in .test1' + GET_VAR 'x: kotlin.String declared in .test1.' type=kotlin.String origin=null FUN name:test2 visibility:public modality:FINAL <> () returnType:.J BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test2 (): .J declared in ' @@ -18,7 +19,8 @@ FILE fqName: fileName:/samConversionToGeneric.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (x:kotlin.String) returnType:kotlin.String VALUE_PARAMETER name:x index:0 type:kotlin.String BLOCK_BODY - GET_VAR 'x: kotlin.String declared in .test2.' type=kotlin.String origin=null + RETURN type=kotlin.Nothing from='local final fun (x: kotlin.String): kotlin.String declared in .test2' + GET_VAR 'x: kotlin.String declared in .test2.' type=kotlin.String origin=null FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test3 (): kotlin.Unit declared in ' @@ -28,7 +30,8 @@ FILE fqName: fileName:/samConversionToGeneric.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (x:kotlin.String) returnType:kotlin.String VALUE_PARAMETER name:x index:0 type:kotlin.String BLOCK_BODY - GET_VAR 'x: kotlin.String declared in .test3.' type=kotlin.String origin=null + RETURN type=kotlin.Nothing from='local final fun (x: kotlin.String): kotlin.String declared in .test3' + GET_VAR 'x: kotlin.String declared in .test3.' type=kotlin.String origin=null FUN name:test4 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Any BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/variableAsFunctionCall.fir.txt b/compiler/testData/ir/irText/expressions/variableAsFunctionCall.fir.txt index c922dac4e17..430c896a235 100644 --- a/compiler/testData/ir/irText/expressions/variableAsFunctionCall.fir.txt +++ b/compiler/testData/ir/irText/expressions/variableAsFunctionCall.fir.txt @@ -6,30 +6,31 @@ FILE fqName: fileName:/variableAsFunctionCall.kt FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.String BLOCK_BODY - GET_VAR ': kotlin.String declared in .k' type=kotlin.String origin=null + RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .k' + GET_VAR ': kotlin.String declared in .k' type=kotlin.String origin=null FUN name:test1 visibility:public modality:FINAL <> (f:kotlin.Function0) returnType:kotlin.Unit VALUE_PARAMETER name:f index:0 type:kotlin.Function0 BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test1 (f: kotlin.Function0): kotlin.Unit declared in ' - CALL 'public abstract fun invoke (): kotlin.Unit [operator] declared in kotlin.Function0' type=kotlin.Unit origin=null + CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.Unit origin=INVOKE $this: GET_VAR 'f: kotlin.Function0 declared in .test1' type=kotlin.Function0 origin=null FUN name:test2 visibility:public modality:FINAL <> (f:kotlin.Function1) returnType:kotlin.Unit VALUE_PARAMETER name:f index:0 type:kotlin.Function1 BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test2 (f: kotlin.Function1): kotlin.Unit declared in ' - CALL 'public abstract fun invoke (p1: kotlin.String): kotlin.Unit [operator] declared in kotlin.Function1' type=kotlin.Unit origin=null + CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 [operator] declared in kotlin.Function1' type=kotlin.Unit origin=INVOKE $this: GET_VAR 'f: kotlin.Function1 declared in .test2' type=kotlin.Function1 origin=null p1: CONST String type=kotlin.String value="hello" FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test3 (): kotlin.String declared in ' - CALL 'public abstract fun invoke (): kotlin.String [operator] declared in kotlin.Function0' type=kotlin.String origin=null + CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.String origin=INVOKE $this: CALL 'public final fun k (): kotlin.Function0 declared in ' type=kotlin.Function0 origin=null $receiver: CONST String type=kotlin.String value="hello" FUN name:test4 visibility:public modality:FINAL <> (ns:kotlin.String?) returnType:kotlin.String? VALUE_PARAMETER name:ns index:0 type:kotlin.String? BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test4 (ns: kotlin.String?): kotlin.String? declared in ' - CALL 'public abstract fun invoke (): kotlin.String [operator] declared in kotlin.Function0' type=kotlin.String? origin=null + CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=kotlin.String? origin=INVOKE $this: CALL 'public final fun k (): kotlin.Function0 declared in ' type=kotlin.Function0? origin=null $receiver: GET_VAR 'ns: kotlin.String? declared in .test4' type=kotlin.String? origin=null diff --git a/compiler/testData/ir/irText/expressions/variableAsFunctionCallWithGenerics.fir.txt b/compiler/testData/ir/irText/expressions/variableAsFunctionCallWithGenerics.fir.txt index f5952caf9a7..769254c975d 100644 --- a/compiler/testData/ir/irText/expressions/variableAsFunctionCallWithGenerics.fir.txt +++ b/compiler/testData/ir/irText/expressions/variableAsFunctionCallWithGenerics.fir.txt @@ -7,12 +7,13 @@ FILE fqName: fileName:/variableAsFunctionCallWithGenerics.kt FUN_EXPR type=kotlin.Function0> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:T of BLOCK_BODY - ERROR_CALL 'Unresolved reference: this@R|/gk|' type=T of + RETURN type=kotlin.Nothing from='local final fun (): T of declared in .' + ERROR_CALL 'Unresolved reference: this@R|/gk|' type=T of FUN name:testGeneric1 visibility:public modality:FINAL <> (x:kotlin.String) returnType:T of VALUE_PARAMETER name:x index:0 type:kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testGeneric1 (x: kotlin.String): T of declared in ' - CALL 'public abstract fun invoke (): T of [operator] declared in kotlin.Function0' type=T of origin=null + CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of origin=INVOKE $this: CALL 'public final fun (): kotlin.Function0> declared in ' type=kotlin.Function0 origin=null PROPERTY name:kt26531Val visibility:public modality:FINAL [val] FUN name: visibility:public modality:FINAL <> () returnType:kotlin.Function0> @@ -27,5 +28,5 @@ FILE fqName: fileName:/variableAsFunctionCallWithGenerics.kt FUN name:kt26531 visibility:public modality:FINAL <> () returnType:T of BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun kt26531 (): T of declared in ' - CALL 'public abstract fun invoke (): T of [operator] declared in kotlin.Function0' type=T of origin=null + CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of origin=INVOKE $this: CALL 'public final fun (): kotlin.Function0> declared in ' type=kotlin.Function0 origin=null diff --git a/compiler/testData/ir/irText/expressions/whenReturn.txt b/compiler/testData/ir/irText/expressions/whenReturn.txt deleted file mode 100644 index 3b8cb956d90..00000000000 --- a/compiler/testData/ir/irText/expressions/whenReturn.txt +++ /dev/null @@ -1,38 +0,0 @@ -FILE fqName: fileName:/whenReturn.kt - FUN name:toString visibility:public modality:FINAL <> (grade:kotlin.String) returnType:kotlin.String - VALUE_PARAMETER name:grade index:0 type:kotlin.String - BLOCK_BODY - BLOCK type=kotlin.Unit origin=WHEN - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.String [val] - GET_VAR 'grade: kotlin.String declared in .toString' type=kotlin.String origin=null - WHEN type=kotlin.Unit origin=WHEN - BRANCH - if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val tmp_0: kotlin.String [val] declared in .toString' type=kotlin.String origin=null - arg1: CONST String type=kotlin.String value="A" - then: RETURN type=kotlin.Nothing from='public final fun toString (grade: kotlin.String): kotlin.String declared in ' - CONST String type=kotlin.String value="Excellent" - BRANCH - if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val tmp_0: kotlin.String [val] declared in .toString' type=kotlin.String origin=null - arg1: CONST String type=kotlin.String value="B" - then: RETURN type=kotlin.Nothing from='public final fun toString (grade: kotlin.String): kotlin.String declared in ' - CONST String type=kotlin.String value="Good" - BRANCH - if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val tmp_0: kotlin.String [val] declared in .toString' type=kotlin.String origin=null - arg1: CONST String type=kotlin.String value="C" - then: RETURN type=kotlin.Nothing from='public final fun toString (grade: kotlin.String): kotlin.String declared in ' - CONST String type=kotlin.String value="Mediocre" - BRANCH - if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val tmp_0: kotlin.String [val] declared in .toString' type=kotlin.String origin=null - arg1: CONST String type=kotlin.String value="D" - then: RETURN type=kotlin.Nothing from='public final fun toString (grade: kotlin.String): kotlin.String declared in ' - CONST String type=kotlin.String value="Fair" - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: RETURN type=kotlin.Nothing from='public final fun toString (grade: kotlin.String): kotlin.String declared in ' - CONST String type=kotlin.String value="Failure" - RETURN type=kotlin.Nothing from='public final fun toString (grade: kotlin.String): kotlin.String declared in ' - CONST String type=kotlin.String value="???" diff --git a/compiler/testData/ir/irText/lambdas/destructuringInLambda.fir.txt b/compiler/testData/ir/irText/lambdas/destructuringInLambda.fir.txt index ae88ca261ab..b5d8739c022 100644 --- a/compiler/testData/ir/irText/lambdas/destructuringInLambda.fir.txt +++ b/compiler/testData/ir/irText/lambdas/destructuringInLambda.fir.txt @@ -78,9 +78,10 @@ FILE fqName: fileName:/destructuringInLambda.kt VAR name:y type:kotlin.Int [val] CALL 'public final fun component2 (): kotlin.Int declared in .A' type=kotlin.Int origin=null $this: GET_VAR ': .A declared in .fn.' type=.A origin=null - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null - $this: CONST Int type=kotlin.Int value=42 - other: GET_VAR 'val y: kotlin.Int [val] declared in .fn.' type=kotlin.Int origin=null + RETURN type=kotlin.Nothing from='local final fun (: .A): kotlin.Int declared in .fn' + CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null + $this: CONST Int type=kotlin.Int value=42 + other: GET_VAR 'val y: kotlin.Int [val] declared in .fn.' type=kotlin.Int origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function1<.A, kotlin.Int> correspondingProperty: PROPERTY name:fn visibility:public modality:FINAL [var] BLOCK_BODY diff --git a/compiler/testData/ir/irText/lambdas/extensionLambda.fir.txt b/compiler/testData/ir/irText/lambdas/extensionLambda.fir.txt index 75d4bd06a8c..5299e81b0bf 100644 --- a/compiler/testData/ir/irText/lambdas/extensionLambda.fir.txt +++ b/compiler/testData/ir/irText/lambdas/extensionLambda.fir.txt @@ -10,5 +10,6 @@ FILE fqName: fileName:/extensionLambda.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:kotlin.String) returnType:kotlin.Int $receiver: VALUE_PARAMETER name: type:kotlin.String BLOCK_BODY - CALL 'public open fun (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null - $this: GET_VAR ': kotlin.String declared in special.' type=kotlin.String origin=null + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Int declared in .test1' + CALL 'public open fun (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null + $this: GET_VAR ': kotlin.String declared in special.' type=kotlin.String origin=null diff --git a/compiler/testData/ir/irText/lambdas/justLambda.fir.txt b/compiler/testData/ir/irText/lambdas/justLambda.fir.txt deleted file mode 100644 index af1bb5fd42f..00000000000 --- a/compiler/testData/ir/irText/lambdas/justLambda.fir.txt +++ /dev/null @@ -1,25 +0,0 @@ -FILE fqName: fileName:/justLambda.kt - PROPERTY name:test1 visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.Function0 visibility:private [final,static] - EXPRESSION_BODY - FUN_EXPR type=kotlin.Function0 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Int - BLOCK_BODY - CONST Int type=kotlin.Int value=42 - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function0 - correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [val] - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Function0 declared in ' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.Function0 visibility:private [final,static]' type=kotlin.Function0 origin=null - PROPERTY name:test2 visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.Function0 visibility:private [final,static] - EXPRESSION_BODY - FUN_EXPR type=kotlin.Function0 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function0 - correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val] - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Function0 declared in ' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.Function0 visibility:private [final,static]' type=kotlin.Function0 origin=null diff --git a/compiler/testData/ir/irText/lambdas/justLambda.kt b/compiler/testData/ir/irText/lambdas/justLambda.kt index 3fb4136b231..274aabf0789 100644 --- a/compiler/testData/ir/irText/lambdas/justLambda.kt +++ b/compiler/testData/ir/irText/lambdas/justLambda.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL val test1 = { 42 } val test2 = { } \ No newline at end of file diff --git a/compiler/testData/ir/irText/lambdas/justLambda.txt b/compiler/testData/ir/irText/lambdas/justLambda.txt index 9a0cc50ffb4..e9ee1d38fef 100644 --- a/compiler/testData/ir/irText/lambdas/justLambda.txt +++ b/compiler/testData/ir/irText/lambdas/justLambda.txt @@ -18,8 +18,7 @@ FILE fqName: fileName:/justLambda.kt FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (): kotlin.Unit declared in .test2' - GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit + GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Function0 correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val] BLOCK_BODY diff --git a/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.fir.txt b/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.fir.txt index acc4dfb9da0..799906b61ee 100644 --- a/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.fir.txt +++ b/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.fir.txt @@ -92,21 +92,24 @@ FILE fqName: fileName:/multipleImplicitReceivers.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.A) returnType:kotlin.Int $receiver: VALUE_PARAMETER name: type:.A BLOCK_BODY - CALL 'public final fun with (receiver: T of kotlin.with, block: kotlin.Function1): R of kotlin.with [inline] declared in kotlin' type=kotlin.Int origin=null - : .IFoo - : kotlin.Int - receiver: GET_VAR 'fooImpl: .IFoo declared in .test' type=.IFoo origin=null - block: FUN_EXPR type=kotlin.Function1<.IFoo, kotlin.Int> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.IFoo) returnType:kotlin.Int - $receiver: VALUE_PARAMETER name: type:.IFoo - BLOCK_BODY - CALL 'public final fun with (receiver: T of kotlin.with, block: kotlin.Function1): R of kotlin.with [inline] declared in kotlin' type=kotlin.Int origin=null - : .IInvoke - : kotlin.Int - receiver: GET_VAR 'invokeImpl: .IInvoke declared in .test' type=.IInvoke origin=null - block: FUN_EXPR type=kotlin.Function1<.IInvoke, kotlin.Int> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.IInvoke) returnType:kotlin.Int - $receiver: VALUE_PARAMETER name: type:.IInvoke - BLOCK_BODY - CALL 'public open fun invoke (): kotlin.Int [operator] declared in .IInvoke' type=kotlin.Int origin=null - $this: GET_VAR ': .IInvoke declared in special.' type=.IInvoke origin=null + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Int declared in .test' + CALL 'public final fun with (receiver: T of kotlin.with, block: kotlin.Function1): R of kotlin.with [inline] declared in kotlin' type=kotlin.Int origin=null + : .IFoo + : kotlin.Int + receiver: GET_VAR 'fooImpl: .IFoo declared in .test' type=.IFoo origin=null + block: FUN_EXPR type=kotlin.Function1<.IFoo, kotlin.Int> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.IFoo) returnType:kotlin.Int + $receiver: VALUE_PARAMETER name: type:.IFoo + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Int declared in .test.' + CALL 'public final fun with (receiver: T of kotlin.with, block: kotlin.Function1): R of kotlin.with [inline] declared in kotlin' type=kotlin.Int origin=null + : .IInvoke + : kotlin.Int + receiver: GET_VAR 'invokeImpl: .IInvoke declared in .test' type=.IInvoke origin=null + block: FUN_EXPR type=kotlin.Function1<.IInvoke, kotlin.Int> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.IInvoke) returnType:kotlin.Int + $receiver: VALUE_PARAMETER name: type:.IInvoke + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Int declared in .test..' + CALL 'public open fun invoke (): kotlin.Int [operator] declared in .IInvoke' type=kotlin.Int origin=null + $this: GET_VAR ': .IInvoke declared in special.' type=.IInvoke origin=null diff --git a/compiler/testData/ir/irText/stubs/builtinMap.fir.txt b/compiler/testData/ir/irText/stubs/builtinMap.fir.txt index 3318d76d593..cb633236b0a 100644 --- a/compiler/testData/ir/irText/stubs/builtinMap.fir.txt +++ b/compiler/testData/ir/irText/stubs/builtinMap.fir.txt @@ -26,9 +26,10 @@ FILE fqName: fileName:/builtinMap.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:java.util.LinkedHashMap.plus, V1 of .plus>) returnType:kotlin.Unit $receiver: VALUE_PARAMETER name: type:java.util.LinkedHashMap.plus, V1 of .plus> BLOCK_BODY - CALL 'public open fun put (p0: K1 of .plus?, p1: V1 of .plus?): V1 of .plus? [operator] declared in java.util.HashMap' type=V1 of .plus? origin=null - $this: GET_VAR ': java.util.LinkedHashMap.plus, V1 of .plus> declared in special.' type=java.util.LinkedHashMap.plus, V1 of .plus> origin=null - p0: CALL 'public final fun (): K1 of .plus declared in kotlin.Pair' type=K1 of .plus origin=null - $this: GET_VAR 'pair: kotlin.Pair.plus, V1 of .plus> declared in .plus' type=kotlin.Pair.plus, V1 of .plus> origin=null - p1: CALL 'public final fun (): V1 of .plus declared in kotlin.Pair' type=V1 of .plus origin=null - $this: GET_VAR 'pair: kotlin.Pair.plus, V1 of .plus> declared in .plus' type=kotlin.Pair.plus, V1 of .plus> origin=null + RETURN type=kotlin.Nothing from='local final fun (): kotlin.Unit declared in .plus' + CALL 'public open fun put (p0: K1 of .plus?, p1: V1 of .plus?): V1 of .plus? [operator] declared in java.util.HashMap' type=V1 of .plus? origin=null + $this: GET_VAR ': java.util.LinkedHashMap.plus, V1 of .plus> declared in special.' type=java.util.LinkedHashMap.plus, V1 of .plus> origin=null + p0: CALL 'public final fun (): K1 of .plus declared in kotlin.Pair' type=K1 of .plus origin=null + $this: GET_VAR 'pair: kotlin.Pair.plus, V1 of .plus> declared in .plus' type=kotlin.Pair.plus, V1 of .plus> origin=null + p1: CALL 'public final fun (): V1 of .plus declared in kotlin.Pair' type=V1 of .plus origin=null + $this: GET_VAR 'pair: kotlin.Pair.plus, V1 of .plus> declared in .plus' type=kotlin.Pair.plus, V1 of .plus> origin=null diff --git a/compiler/testData/ir/irText/types/intersectionType2_NI.fir.txt b/compiler/testData/ir/irText/types/intersectionType2_NI.fir.txt index 49b129da83f..3f3d7a3102a 100644 --- a/compiler/testData/ir/irText/types/intersectionType2_NI.fir.txt +++ b/compiler/testData/ir/irText/types/intersectionType2_NI.fir.txt @@ -73,7 +73,7 @@ FILE fqName: fileName:/intersectionType2_NI.kt VALUE_PARAMETER name:fn index:0 type:kotlin.Function0.run> BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun run (fn: kotlin.Function0.run>): T of .run declared in ' - CALL 'public abstract fun invoke (): T of .run [operator] declared in kotlin.Function0' type=T of .run origin=null + CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of .run origin=INVOKE $this: GET_VAR 'fn: kotlin.Function0.run> declared in .run' type=kotlin.Function0.run> origin=null FUN name:foo visibility:public modality:FINAL <> () returnType:.Foo BLOCK_BODY @@ -95,4 +95,5 @@ FILE fqName: fileName:/intersectionType2_NI.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: GET_VAR 'val nn: .C [val] declared in .foo.' type=.C origin=null - GET_VAR 'val c: .Foo [val] declared in .foo.' type=.Foo origin=null + RETURN type=kotlin.Nothing from='local final fun (): .Foo declared in .foo' + GET_VAR 'val c: .Foo [val] declared in .foo.' type=.Foo origin=null diff --git a/compiler/testData/ir/irText/types/intersectionType2_OI.fir.txt b/compiler/testData/ir/irText/types/intersectionType2_OI.fir.txt index 474f72e10d9..42631caf15e 100644 --- a/compiler/testData/ir/irText/types/intersectionType2_OI.fir.txt +++ b/compiler/testData/ir/irText/types/intersectionType2_OI.fir.txt @@ -73,7 +73,7 @@ FILE fqName: fileName:/intersectionType2_OI.kt VALUE_PARAMETER name:fn index:0 type:kotlin.Function0.run> BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun run (fn: kotlin.Function0.run>): T of .run declared in ' - CALL 'public abstract fun invoke (): T of .run [operator] declared in kotlin.Function0' type=T of .run origin=null + CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=T of .run origin=INVOKE $this: GET_VAR 'fn: kotlin.Function0.run> declared in .run' type=kotlin.Function0.run> origin=null FUN name:foo visibility:public modality:FINAL <> () returnType:.Foo BLOCK_BODY @@ -95,4 +95,5 @@ FILE fqName: fileName:/intersectionType2_OI.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: GET_VAR 'val nn: .C [val] declared in .foo.' type=.C origin=null - GET_VAR 'val c: .Foo [val] declared in .foo.' type=.Foo origin=null + RETURN type=kotlin.Nothing from='local final fun (): .Foo declared in .foo' + GET_VAR 'val c: .Foo [val] declared in .foo.' type=.Foo origin=null