diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/CallAndReferenceGenerator.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/CallAndReferenceGenerator.kt index d14166e4ee2..1911714de96 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/CallAndReferenceGenerator.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/CallAndReferenceGenerator.kt @@ -6,9 +6,7 @@ package org.jetbrains.kotlin.fir.backend.generators import org.jetbrains.kotlin.fir.backend.* -import org.jetbrains.kotlin.fir.declarations.FirAnonymousFunction -import org.jetbrains.kotlin.fir.declarations.FirClass -import org.jetbrains.kotlin.fir.declarations.FirValueParameter +import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.expressions.* import org.jetbrains.kotlin.fir.expressions.impl.FirNoReceiverExpression import org.jetbrains.kotlin.fir.psi @@ -153,10 +151,27 @@ internal class CallAndReferenceGenerator( } } + + private fun FirQualifiedAccess.tryConvertToSamConstructorCall(type: IrType): IrTypeOperatorCall? { + val calleeReference = calleeReference as? FirResolvedNamedReference ?: return null + val fir = calleeReference.resolvedSymbol.fir + if (this is FirFunctionCall && fir is FirSimpleFunction && fir.origin == FirDeclarationOrigin.SamConstructor) { + return convertWithOffsets { startOffset, endOffset -> + IrTypeOperatorCallImpl(startOffset, endOffset, type, IrTypeOperator.SAM_CONVERSION, type).apply { + argument = visitor.convertToIrExpression(this@tryConvertToSamConstructorCall.argument) + } + } + } + return null + } + private fun convertToUnsafeIrCall( qualifiedAccess: FirQualifiedAccess, typeRef: FirTypeRef, explicitReceiverExpression: IrExpression?, makeNotNull: Boolean = false ): IrExpression { val type = typeRef.toIrType().let { if (makeNotNull) it.makeNotNull() else it } + val samConstructorCall = qualifiedAccess.tryConvertToSamConstructorCall(type) + if (samConstructorCall != null) return samConstructorCall + val symbol = qualifiedAccess.calleeReference.toSymbol( session, classifierStorage, diff --git a/compiler/testData/codegen/box/funInterface/castFromAny.kt b/compiler/testData/codegen/box/funInterface/castFromAny.kt index e495d3a63ec..423dfdb28f9 100644 --- a/compiler/testData/codegen/box/funInterface/castFromAny.kt +++ b/compiler/testData/codegen/box/funInterface/castFromAny.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions -// IGNORE_BACKEND_FIR: JVM_IR // SKIP_DCE_DRIVEN diff --git a/compiler/testData/codegen/box/funInterface/inlinedSamWrapper.kt b/compiler/testData/codegen/box/funInterface/inlinedSamWrapper.kt index 486cabceb55..97cd9b4ecfe 100644 --- a/compiler/testData/codegen/box/funInterface/inlinedSamWrapper.kt +++ b/compiler/testData/codegen/box/funInterface/inlinedSamWrapper.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions -// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME // SKIP_DCE_DRIVEN diff --git a/compiler/testData/codegen/box/funInterface/primitiveConversions.kt b/compiler/testData/codegen/box/funInterface/primitiveConversions.kt index 1650ebf0387..6f7e7bf9d2a 100644 --- a/compiler/testData/codegen/box/funInterface/primitiveConversions.kt +++ b/compiler/testData/codegen/box/funInterface/primitiveConversions.kt @@ -1,6 +1,5 @@ // !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions -// IGNORE_BACKEND_FIR: JVM_IR // SKIP_DCE_DRIVEN // This test should check argument coercion between the SAM and the lambda. diff --git a/compiler/testData/codegen/box/funInterface/samConstructorExplicitInvocation.kt b/compiler/testData/codegen/box/funInterface/samConstructorExplicitInvocation.kt index 2c37c3adbb2..4c896ed2de4 100644 --- a/compiler/testData/codegen/box/funInterface/samConstructorExplicitInvocation.kt +++ b/compiler/testData/codegen/box/funInterface/samConstructorExplicitInvocation.kt @@ -1,5 +1,4 @@ // !LANGUAGE: +FunctionalInterfaceConversion -// IGNORE_BACKEND_FIR: JVM_IR // SKIP_DCE_DRIVEN fun interface S { diff --git a/compiler/testData/codegen/box/jvmStatic/propertyAccessorsCompanion.kt b/compiler/testData/codegen/box/jvmStatic/propertyAccessorsCompanion.kt index 8fe4f51b63b..528dfc8718d 100644 --- a/compiler/testData/codegen/box/jvmStatic/propertyAccessorsCompanion.kt +++ b/compiler/testData/codegen/box/jvmStatic/propertyAccessorsCompanion.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/jvmStatic/propertyAccessorsObject.kt b/compiler/testData/codegen/box/jvmStatic/propertyAccessorsObject.kt index c5ce7abec58..187b9a12929 100644 --- a/compiler/testData/codegen/box/jvmStatic/propertyAccessorsObject.kt +++ b/compiler/testData/codegen/box/jvmStatic/propertyAccessorsObject.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/enclosing/kt6691_lambdaInSamConstructor.kt b/compiler/testData/codegen/box/reflection/enclosing/kt6691_lambdaInSamConstructor.kt index aff2a36db18..622554630a0 100644 --- a/compiler/testData/codegen/box/reflection/enclosing/kt6691_lambdaInSamConstructor.kt +++ b/compiler/testData/codegen/box/reflection/enclosing/kt6691_lambdaInSamConstructor.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_REFLECT diff --git a/compiler/testData/codegen/box/sam/castFromAny.kt b/compiler/testData/codegen/box/sam/castFromAny.kt index 84baf128d5d..d843ac68847 100644 --- a/compiler/testData/codegen/box/sam/castFromAny.kt +++ b/compiler/testData/codegen/box/sam/castFromAny.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM fun test(a: Any?) { diff --git a/compiler/testData/codegen/box/sam/constructors/filenameFilter.kt b/compiler/testData/codegen/box/sam/constructors/filenameFilter.kt index d1b9a5c6017..81e835d7075 100644 --- a/compiler/testData/codegen/box/sam/constructors/filenameFilter.kt +++ b/compiler/testData/codegen/box/sam/constructors/filenameFilter.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM import java.io.* diff --git a/compiler/testData/codegen/box/sam/constructors/kt16790.kt b/compiler/testData/codegen/box/sam/constructors/kt16790.kt index 204c3938c98..899a3da70fa 100644 --- a/compiler/testData/codegen/box/sam/constructors/kt16790.kt +++ b/compiler/testData/codegen/box/sam/constructors/kt16790.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // SKIP_JDK6 // FULL_JDK diff --git a/compiler/testData/codegen/box/sam/constructors/nonLiteralRunnable.kt b/compiler/testData/codegen/box/sam/constructors/nonLiteralRunnable.kt index 97724cbb54b..59818629db0 100644 --- a/compiler/testData/codegen/box/sam/constructors/nonLiteralRunnable.kt +++ b/compiler/testData/codegen/box/sam/constructors/nonLiteralRunnable.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM fun box(): String { diff --git a/compiler/testData/codegen/box/sam/constructors/nonTrivialRunnable.kt b/compiler/testData/codegen/box/sam/constructors/nonTrivialRunnable.kt index 4ca379aab36..23dd339127c 100644 --- a/compiler/testData/codegen/box/sam/constructors/nonTrivialRunnable.kt +++ b/compiler/testData/codegen/box/sam/constructors/nonTrivialRunnable.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM var result = "FAIL" diff --git a/compiler/testData/codegen/box/sam/constructors/runnable.kt b/compiler/testData/codegen/box/sam/constructors/runnable.kt index 6ffbd52827e..7c4564f0b50 100644 --- a/compiler/testData/codegen/box/sam/constructors/runnable.kt +++ b/compiler/testData/codegen/box/sam/constructors/runnable.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM var result = "FAIL" diff --git a/compiler/testData/codegen/box/sam/constructors/runnableAccessingClosure1.kt b/compiler/testData/codegen/box/sam/constructors/runnableAccessingClosure1.kt index 83ca4756e89..1381931b9f1 100644 --- a/compiler/testData/codegen/box/sam/constructors/runnableAccessingClosure1.kt +++ b/compiler/testData/codegen/box/sam/constructors/runnableAccessingClosure1.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM fun box(): String { diff --git a/compiler/testData/codegen/box/sam/constructors/runnableAccessingClosure2.kt b/compiler/testData/codegen/box/sam/constructors/runnableAccessingClosure2.kt index 0408e137424..15c2ff185e9 100644 --- a/compiler/testData/codegen/box/sam/constructors/runnableAccessingClosure2.kt +++ b/compiler/testData/codegen/box/sam/constructors/runnableAccessingClosure2.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM class Box(val s: String) { diff --git a/compiler/testData/codegen/box/sam/constructors/samWrappersDifferentFiles.kt b/compiler/testData/codegen/box/sam/constructors/samWrappersDifferentFiles.kt index 3ae6b3f26f3..a1adf5fb527 100644 --- a/compiler/testData/codegen/box/sam/constructors/samWrappersDifferentFiles.kt +++ b/compiler/testData/codegen/box/sam/constructors/samWrappersDifferentFiles.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/sam/constructors/sameWrapperClass.kt b/compiler/testData/codegen/box/sam/constructors/sameWrapperClass.kt index d651b23ed7b..6cb9b4faa66 100644 --- a/compiler/testData/codegen/box/sam/constructors/sameWrapperClass.kt +++ b/compiler/testData/codegen/box/sam/constructors/sameWrapperClass.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/sam/nonInlinedSamWrapper.kt b/compiler/testData/codegen/box/sam/nonInlinedSamWrapper.kt index 38384311ff3..82f54bbc645 100644 --- a/compiler/testData/codegen/box/sam/nonInlinedSamWrapper.kt +++ b/compiler/testData/codegen/box/sam/nonInlinedSamWrapper.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME // FILE: Test.java diff --git a/compiler/testData/ir/irText/expressions/funInterface/castFromAny.fir.txt b/compiler/testData/ir/irText/expressions/funInterface/castFromAny.fir.txt index 51107b2a515..1d208b44f29 100644 --- a/compiler/testData/ir/irText/expressions/funInterface/castFromAny.fir.txt +++ b/compiler/testData/ir/irText/expressions/funInterface/castFromAny.fir.txt @@ -22,6 +22,6 @@ FILE fqName: fileName:/castFromAny.kt TYPE_OP type=kotlin.Function0 origin=CAST typeOperand=kotlin.Function0 GET_VAR 'a: kotlin.Any? declared in .test' type=kotlin.Any? origin=null CALL 'public abstract fun invoke (): kotlin.Unit declared in .KRunnable' type=kotlin.Unit origin=null - $this: CALL 'public final fun KRunnable (block: kotlin.Function0): .KRunnable declared in ' type=.KRunnable origin=null - block: TYPE_OP type=kotlin.Function0 origin=IMPLICIT_CAST typeOperand=kotlin.Function0 + $this: TYPE_OP type=.KRunnable origin=SAM_CONVERSION typeOperand=.KRunnable + TYPE_OP type=kotlin.Function0 origin=IMPLICIT_CAST typeOperand=kotlin.Function0 GET_VAR 'a: kotlin.Any? declared in .test' type=kotlin.Any? origin=null diff --git a/compiler/testData/ir/irText/expressions/funInterface/samConversionOnCallableReference.fir.txt b/compiler/testData/ir/irText/expressions/funInterface/samConversionOnCallableReference.fir.txt index 47cc1cd3102..5d01d1cb5fc 100644 --- a/compiler/testData/ir/irText/expressions/funInterface/samConversionOnCallableReference.fir.txt +++ b/compiler/testData/ir/irText/expressions/funInterface/samConversionOnCallableReference.fir.txt @@ -29,8 +29,8 @@ FILE fqName: fileName:/samConversionOnCallableReference.kt FUN name:testSamConstructor visibility:public modality:FINAL <> () returnType:.KRunnable BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testSamConstructor (): .KRunnable declared in ' - CALL 'public final fun KRunnable (block: kotlin.Function0): .KRunnable declared in ' type=.KRunnable origin=null - block: FUNCTION_REFERENCE 'public final fun foo0 (): kotlin.Unit declared in ' type=kotlin.reflect.KFunction0 origin=null reflectionTarget= + TYPE_OP type=.KRunnable origin=SAM_CONVERSION typeOperand=.KRunnable + FUNCTION_REFERENCE 'public final fun foo0 (): kotlin.Unit declared in ' type=kotlin.reflect.KFunction0 origin=null reflectionTarget= FUN name:testSamCosntructorOnAdapted visibility:public modality:FINAL <> () returnType:IrErrorType BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testSamCosntructorOnAdapted (): IrErrorType declared in ' diff --git a/compiler/testData/ir/irText/expressions/sam/samConstructors.fir.txt b/compiler/testData/ir/irText/expressions/sam/samConstructors.fir.txt index 3a62b097159..76d3d8cba80 100644 --- a/compiler/testData/ir/irText/expressions/sam/samConstructors.fir.txt +++ b/compiler/testData/ir/irText/expressions/sam/samConstructors.fir.txt @@ -2,8 +2,8 @@ FILE fqName: fileName:/samConstructors.kt FUN name:test1 visibility:public modality:FINAL <> () returnType:java.lang.Runnable BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test1 (): java.lang.Runnable declared in ' - CALL 'public final fun Runnable (block: kotlin.Function0): java.lang.Runnable declared in java.lang' type=java.lang.Runnable origin=null - block: FUN_EXPR type=kotlin.Function0 origin=LAMBDA + TYPE_OP type=java.lang.Runnable origin=SAM_CONVERSION typeOperand=java.lang.Runnable + 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 .test1' @@ -12,21 +12,20 @@ FILE fqName: fileName:/samConstructors.kt VALUE_PARAMETER name:a index:0 type:kotlin.Function0 BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test2 (a: kotlin.Function0): java.lang.Runnable declared in ' - CALL 'public final fun Runnable (block: kotlin.Function0): java.lang.Runnable declared in java.lang' type=java.lang.Runnable origin=null - block: GET_VAR 'a: kotlin.Function0 declared in .test2' type=kotlin.Function0 origin=null + TYPE_OP type=java.lang.Runnable origin=SAM_CONVERSION typeOperand=java.lang.Runnable + GET_VAR 'a: kotlin.Function0 declared in .test2' type=kotlin.Function0 origin=null FUN name:foo visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY FUN name:test3 visibility:public modality:FINAL <> () returnType:java.lang.Runnable BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test3 (): java.lang.Runnable declared in ' - CALL 'public final fun Runnable (block: kotlin.Function0): java.lang.Runnable declared in java.lang' type=java.lang.Runnable origin=null - block: FUNCTION_REFERENCE 'public final fun foo (): kotlin.Unit declared in ' type=kotlin.reflect.KFunction0 origin=null reflectionTarget= + TYPE_OP type=java.lang.Runnable origin=SAM_CONVERSION typeOperand=java.lang.Runnable + FUNCTION_REFERENCE 'public final fun foo (): kotlin.Unit declared in ' type=kotlin.reflect.KFunction0 origin=null reflectionTarget= FUN name:test4 visibility:public modality:FINAL <> () returnType:java.util.Comparator BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test4 (): java.util.Comparator declared in ' - CALL 'public final fun Comparator (block: kotlin.Function2): java.util.Comparator declared in java.util' type=java.util.Comparator origin=null - : kotlin.Int? - block: FUN_EXPR type=kotlin.Function2 origin=LAMBDA + TYPE_OP type=java.util.Comparator origin=SAM_CONVERSION typeOperand=java.util.Comparator + FUN_EXPR type=kotlin.Function2 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (a:kotlin.Int?, b:kotlin.Int?) returnType:kotlin.Int VALUE_PARAMETER name:a index:0 type:kotlin.Int? VALUE_PARAMETER name:b index:1 type:kotlin.Int? diff --git a/compiler/testData/ir/irText/expressions/sam/samConversionToGeneric.fir.txt b/compiler/testData/ir/irText/expressions/sam/samConversionToGeneric.fir.txt index 062baf3e611..e92aa5bc79d 100644 --- a/compiler/testData/ir/irText/expressions/sam/samConversionToGeneric.fir.txt +++ b/compiler/testData/ir/irText/expressions/sam/samConversionToGeneric.fir.txt @@ -2,9 +2,8 @@ FILE fqName: fileName:/samConversionToGeneric.kt FUN name:test1 visibility:public modality:FINAL <> () returnType:.J BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test1 (): .J declared in ' - CALL 'public final fun J (block: kotlin.Function1.J?, T of .J?>): .J.J> declared in ' type=.J origin=null - : kotlin.String? - block: FUN_EXPR type=kotlin.Function1 origin=LAMBDA + TYPE_OP type=.J origin=SAM_CONVERSION typeOperand=.J + FUN_EXPR type=kotlin.Function1 origin=LAMBDA 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 @@ -13,9 +12,8 @@ FILE fqName: fileName:/samConversionToGeneric.kt FUN name:test2 visibility:public modality:FINAL <> () returnType:.J BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test2 (): .J declared in ' - CALL 'public final fun J (block: kotlin.Function1.J?, T of .J?>): .J.J> declared in ' type=.J origin=null - : kotlin.String? - block: FUN_EXPR type=kotlin.Function1 origin=LAMBDA + TYPE_OP type=.J origin=SAM_CONVERSION typeOperand=.J + FUN_EXPR type=kotlin.Function1 origin=LAMBDA 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 @@ -75,9 +73,8 @@ FILE fqName: fileName:/samConversionToGeneric.kt VALUE_PARAMETER name:efn index:0 type:kotlin.Function1 BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test8 (efn: kotlin.Function1): .J declared in ' - CALL 'public final fun J (block: kotlin.Function1.J?, T of .J?>): .J.J> declared in ' type=.J origin=null - : kotlin.String? - block: GET_VAR 'efn: kotlin.Function1 declared in .test8' type=kotlin.Function1 origin=null + TYPE_OP type=.J origin=SAM_CONVERSION typeOperand=.J + GET_VAR 'efn: kotlin.Function1 declared in .test8' type=kotlin.Function1 origin=null FUN name:test9 visibility:public modality:FINAL <> (efn:kotlin.Function1) returnType:kotlin.Unit VALUE_PARAMETER name:efn index:0 type:kotlin.Function1 BLOCK_BODY diff --git a/compiler/testData/ir/irText/lambdas/samAdapter.fir.txt b/compiler/testData/ir/irText/lambdas/samAdapter.fir.txt deleted file mode 100644 index 94d80f6f9d8..00000000000 --- a/compiler/testData/ir/irText/lambdas/samAdapter.fir.txt +++ /dev/null @@ -1,12 +0,0 @@ -FILE fqName: fileName:/samAdapter.kt - FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - VAR name:hello type:java.lang.Runnable [val] - CALL 'public final fun Runnable (block: kotlin.Function0): java.lang.Runnable declared in java.lang' type=java.lang.Runnable origin=null - block: FUN_EXPR type=kotlin.Function0 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - CALL 'public final fun println (message: kotlin.Any?): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null - message: CONST String type=kotlin.String value="Hello, world!" - CALL 'public abstract fun run (): kotlin.Unit declared in java.lang.Runnable' type=kotlin.Unit origin=null - $this: GET_VAR 'val hello: java.lang.Runnable [val] declared in .test1' type=java.lang.Runnable origin=null diff --git a/compiler/testData/ir/irText/lambdas/samAdapter.kt b/compiler/testData/ir/irText/lambdas/samAdapter.kt index bfc6f5e4bb7..54ba067d9df 100644 --- a/compiler/testData/ir/irText/lambdas/samAdapter.kt +++ b/compiler/testData/ir/irText/lambdas/samAdapter.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // WITH_RUNTIME fun test1() {