From 53f66e95090b28f5368236191e34c6e065759393 Mon Sep 17 00:00:00 2001 From: Dmitry Petrov Date: Wed, 29 Jan 2020 16:15:01 +0300 Subject: [PATCH] PSI2IR: SAM conversion in varargs --- .../kotlin/fir/Fir2IrTextTestGenerated.java | 5 ++ .../generators/ArgumentsGenerationUtils.kt | 42 ++++++++-- .../withAdaptationForSam.fir.txt | 3 - .../withAdaptationForSam.kt | 6 -- .../withAdaptationForSam.txt | 3 - .../samConversionInVarargs.fir.txt | 57 ++++++++++++++ .../funInterface/samConversionInVarargs.kt | 21 +++++ .../funInterface/samConversionInVarargs.txt | 77 +++++++++++++++++++ .../kotlin/ir/IrTextTestCaseGenerated.java | 5 ++ 9 files changed, 200 insertions(+), 19 deletions(-) create mode 100644 compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.fir.txt create mode 100644 compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.kt create mode 100644 compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.txt diff --git a/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/fir/Fir2IrTextTestGenerated.java b/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/fir/Fir2IrTextTestGenerated.java index d0882dee226..fe47b4eefb6 100644 --- a/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/fir/Fir2IrTextTestGenerated.java +++ b/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/fir/Fir2IrTextTestGenerated.java @@ -1500,6 +1500,11 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest { runTest("compiler/testData/ir/irText/expressions/funInterface/partialSam.kt"); } + @TestMetadata("samConversionInVarargs.kt") + public void testSamConversionInVarargs() throws Exception { + runTest("compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.kt"); + } + @TestMetadata("samConversionOnCallableReference.kt") public void testSamConversionOnCallableReference() throws Exception { runTest("compiler/testData/ir/irText/expressions/funInterface/samConversionOnCallableReference.kt"); diff --git a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ArgumentsGenerationUtils.kt b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ArgumentsGenerationUtils.kt index 52c30b9caaa..f5efe61b38b 100644 --- a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ArgumentsGenerationUtils.kt +++ b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ArgumentsGenerationUtils.kt @@ -23,10 +23,7 @@ import org.jetbrains.kotlin.descriptors.* import org.jetbrains.kotlin.descriptors.impl.SyntheticFieldDescriptor import org.jetbrains.kotlin.descriptors.impl.TypeAliasConstructorDescriptor import org.jetbrains.kotlin.incremental.components.NoLookupLocation -import org.jetbrains.kotlin.ir.expressions.IrDeclarationReference -import org.jetbrains.kotlin.ir.expressions.IrExpression -import org.jetbrains.kotlin.ir.expressions.IrExpressionWithCopy -import org.jetbrains.kotlin.ir.expressions.IrTypeOperator +import org.jetbrains.kotlin.ir.expressions.* import org.jetbrains.kotlin.ir.expressions.impl.* import org.jetbrains.kotlin.ir.types.IrType import org.jetbrains.kotlin.psi.KtElement @@ -447,6 +444,7 @@ fun StatementGenerator.generateSamConversionForValueArgumentsIfRequired(call: Ca } val samKotlinType = samConversion.getSamTypeForValueParameter(underlyingValueParameter) + ?: underlyingValueParameter.varargElementType // If we have a vararg, vararg element type will be taken ?: underlyingValueParameter.type val originalArgument = call.irValueArgumentsByIndex[i] ?: continue @@ -460,14 +458,44 @@ fun StatementGenerator.generateSamConversionForValueArgumentsIfRequired(call: Ca val irSamType = substitutedSamType.toIrType() - call.irValueArgumentsByIndex[i] = + fun samConvertScalarExpression(irArgument: IrExpression) = IrTypeOperatorCallImpl( - originalArgument.startOffset, originalArgument.endOffset, + irArgument.startOffset, irArgument.endOffset, irSamType, IrTypeOperator.SAM_CONVERSION, irSamType, - castArgumentToFunctionalInterfaceForSamType(originalArgument, substitutedSamType) + castArgumentToFunctionalInterfaceForSamType(irArgument, substitutedSamType) ) + + call.irValueArgumentsByIndex[i] = + if (originalArgument !is IrVararg) { + samConvertScalarExpression(originalArgument) + } else { + if (underlyingValueParameter.varargElementType == null) { + throw AssertionError("Vararg parameter expected for vararg argument: $underlyingValueParameter") + } + + val substitutedVarargType = + typeSubstitutor.substitute(underlyingValueParameter.type, Variance.INVARIANT) + ?: throw AssertionError( + "Failed to substitute vararg type in SAM conversion: " + + "type=${underlyingValueParameter.type}, " + + "substitutionContext=$substitutionContext" + ) + + IrVarargImpl( + originalArgument.startOffset, originalArgument.endOffset, + substitutedVarargType.toIrType(), + irSamType + ).apply { + originalArgument.elements.mapTo(elements) { + if (it is IrExpression) + samConvertScalarExpression(it) + else + throw AssertionError("Unsupported: spread vararg element with SAM conversion") + } + } + } } } diff --git a/compiler/testData/ir/irText/expressions/callableReferences/withAdaptationForSam.fir.txt b/compiler/testData/ir/irText/expressions/callableReferences/withAdaptationForSam.fir.txt index 3a2dfe27015..db6ee74ca4c 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/withAdaptationForSam.fir.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/withAdaptationForSam.fir.txt @@ -20,9 +20,6 @@ FILE fqName: fileName:/withAdaptationForSam.kt FUN name:useFoo visibility:public modality:FINAL <> (foo:.IFoo) returnType:kotlin.Unit VALUE_PARAMETER name:foo index:0 type:.IFoo BLOCK_BODY - FUN name:useVarargFoo visibility:public modality:FINAL <> (foos:kotlin.Array<.IFoo>) returnType:kotlin.Unit - VALUE_PARAMETER name:foos index:0 type:kotlin.Array<.IFoo> - BLOCK_BODY FUN name:withVararg visibility:public modality:FINAL <> (xs:kotlin.IntArray) returnType:kotlin.Int VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/callableReferences/withAdaptationForSam.kt b/compiler/testData/ir/irText/expressions/callableReferences/withAdaptationForSam.kt index fccbeec46a7..9a3b4408ff4 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/withAdaptationForSam.kt +++ b/compiler/testData/ir/irText/expressions/callableReferences/withAdaptationForSam.kt @@ -6,15 +6,9 @@ fun interface IFoo { fun useFoo(foo: IFoo) {} -fun useVarargFoo(vararg foos: IFoo) {} - fun withVararg(vararg xs: Int) = 42 fun test() { useFoo(::withVararg) } -// TODO -//fun testVarargOfSams() { -// useVarargFoo(::withVararg) -//} \ No newline at end of file diff --git a/compiler/testData/ir/irText/expressions/callableReferences/withAdaptationForSam.txt b/compiler/testData/ir/irText/expressions/callableReferences/withAdaptationForSam.txt index acd0b3c89fa..448c0d617b2 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/withAdaptationForSam.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/withAdaptationForSam.txt @@ -20,9 +20,6 @@ FILE fqName: fileName:/withAdaptationForSam.kt FUN name:useFoo visibility:public modality:FINAL <> (foo:.IFoo) returnType:kotlin.Unit VALUE_PARAMETER name:foo index:0 type:.IFoo BLOCK_BODY - FUN name:useVarargFoo visibility:public modality:FINAL <> (foos:kotlin.Array.IFoo>) returnType:kotlin.Unit - VALUE_PARAMETER name:foos index:0 type:kotlin.Array.IFoo> varargElementType:.IFoo [vararg] - BLOCK_BODY FUN name:withVararg visibility:public modality:FINAL <> (xs:kotlin.IntArray) returnType:kotlin.Int VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg] BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.fir.txt b/compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.fir.txt new file mode 100644 index 00000000000..181a3eb5a31 --- /dev/null +++ b/compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.fir.txt @@ -0,0 +1,57 @@ +FILE fqName: fileName:/samConversionInVarargs.kt + CLASS INTERFACE name:IFoo modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.IFoo + FUN name:foo visibility:public modality:ABSTRACT <> ($this:.IFoo, i:kotlin.Int) returnType:kotlin.Unit + $this: VALUE_PARAMETER name: type:.IFoo + VALUE_PARAMETER name:i index:0 type:kotlin.Int + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN name:useVararg visibility:public modality:FINAL <> (foos:kotlin.Array<.IFoo>) returnType:kotlin.Unit + VALUE_PARAMETER name:foos index:0 type:kotlin.Array<.IFoo> + BLOCK_BODY + FUN name:testLambda visibility:public modality:FINAL <> () returnType:kotlin.Unit + BLOCK_BODY + CALL 'public final fun useVararg (foos: kotlin.Array<.IFoo>): kotlin.Unit declared in ' type=kotlin.Unit origin=null + foos: FUN_EXPR type=kotlin.Function1 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.Int) returnType:kotlin.Unit + VALUE_PARAMETER name:it index:0 type:kotlin.Int + BLOCK_BODY + GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit + FUN name:testSeveralLambdas visibility:public modality:FINAL <> () returnType:kotlin.Unit + BLOCK_BODY + ERROR_CALL 'Cannot bind 3 arguments to useVararg call with 1 parameters' type=kotlin.Unit + FUN_EXPR type=kotlin.Function1 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.Int) returnType:kotlin.Unit + VALUE_PARAMETER name:it index:0 type:kotlin.Int + BLOCK_BODY + GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit + FUN_EXPR type=kotlin.Function1 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.Int) returnType:kotlin.Unit + VALUE_PARAMETER name:it index:0 type:kotlin.Int + BLOCK_BODY + GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit + FUN_EXPR type=kotlin.Function1 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.Int) returnType:kotlin.Unit + VALUE_PARAMETER name:it index:0 type:kotlin.Int + BLOCK_BODY + GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit + FUN name:withVarargOfInt visibility:public modality:FINAL <> (xs:kotlin.IntArray) returnType:kotlin.String + VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun withVarargOfInt (xs: kotlin.IntArray): kotlin.String declared in ' + CONST String type=kotlin.String value="" + FUN name:testAdaptedCR visibility:public modality:FINAL <> () returnType:kotlin.Unit + BLOCK_BODY + ERROR_CALL 'Unresolved reference: #' type=IrErrorType + FUNCTION_REFERENCE 'public final fun withVarargOfInt (xs: kotlin.IntArray): kotlin.String declared in ' type=kotlin.reflect.KFunction1 origin=null reflectionTarget= diff --git a/compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.kt b/compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.kt new file mode 100644 index 00000000000..89dbd62cf78 --- /dev/null +++ b/compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.kt @@ -0,0 +1,21 @@ +// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions + +fun interface IFoo { + fun foo(i: Int) +} + +fun useVararg(vararg foos: IFoo) {} + +fun testLambda() { + useVararg({}) +} + +fun testSeveralLambdas() { + useVararg({}, {}, {}) +} + +fun withVarargOfInt(vararg xs: Int) = "" + +fun testAdaptedCR() { + useVararg(::withVarargOfInt) +} \ No newline at end of file diff --git a/compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.txt b/compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.txt new file mode 100644 index 00000000000..93a65757fb9 --- /dev/null +++ b/compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.txt @@ -0,0 +1,77 @@ +FILE fqName: fileName:/samConversionInVarargs.kt + CLASS INTERFACE name:IFoo modality:ABSTRACT visibility:public [fun] superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.IFoo + FUN name:foo visibility:public modality:ABSTRACT <> ($this:.IFoo, i:kotlin.Int) returnType:kotlin.Unit + $this: VALUE_PARAMETER name: type:.IFoo + VALUE_PARAMETER name:i index:0 type:kotlin.Int + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN name:useVararg visibility:public modality:FINAL <> (foos:kotlin.Array.IFoo>) returnType:kotlin.Unit + VALUE_PARAMETER name:foos index:0 type:kotlin.Array.IFoo> varargElementType:.IFoo [vararg] + BLOCK_BODY + FUN name:testLambda visibility:public modality:FINAL <> () returnType:kotlin.Unit + BLOCK_BODY + CALL 'public final fun useVararg (vararg foos: .IFoo): kotlin.Unit declared in ' type=kotlin.Unit origin=null + foos: VARARG type=kotlin.Array.IFoo> varargElementType=.IFoo + TYPE_OP type=.IFoo origin=SAM_CONVERSION typeOperand=.IFoo + FUN_EXPR type=kotlin.Function1<@[ParameterName(name = 'i')] kotlin.Int, kotlin.Unit> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.Int) returnType:kotlin.Unit + VALUE_PARAMETER name:it index:0 type:kotlin.Int + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Int): kotlin.Unit declared in .testLambda' + GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit + FUN name:testSeveralLambdas visibility:public modality:FINAL <> () returnType:kotlin.Unit + BLOCK_BODY + CALL 'public final fun useVararg (vararg foos: .IFoo): kotlin.Unit declared in ' type=kotlin.Unit origin=null + foos: VARARG type=kotlin.Array.IFoo> varargElementType=.IFoo + TYPE_OP type=.IFoo origin=IMPLICIT_CAST typeOperand=.IFoo + FUN_EXPR type=kotlin.Function1<@[ParameterName(name = 'i')] kotlin.Int, kotlin.Unit> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.Int) returnType:kotlin.Unit + VALUE_PARAMETER name:it index:0 type:kotlin.Int + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Int): kotlin.Unit declared in .testSeveralLambdas' + GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit + TYPE_OP type=.IFoo origin=IMPLICIT_CAST typeOperand=.IFoo + FUN_EXPR type=kotlin.Function1<@[ParameterName(name = 'i')] kotlin.Int, kotlin.Unit> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.Int) returnType:kotlin.Unit + VALUE_PARAMETER name:it index:0 type:kotlin.Int + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Int): kotlin.Unit declared in .testSeveralLambdas' + GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit + TYPE_OP type=.IFoo origin=IMPLICIT_CAST typeOperand=.IFoo + FUN_EXPR type=kotlin.Function1<@[ParameterName(name = 'i')] kotlin.Int, kotlin.Unit> origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.Int) returnType:kotlin.Unit + VALUE_PARAMETER name:it index:0 type:kotlin.Int + BLOCK_BODY + RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Int): kotlin.Unit declared in .testSeveralLambdas' + GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit + FUN name:withVarargOfInt visibility:public modality:FINAL <> (xs:kotlin.IntArray) returnType:kotlin.String + VALUE_PARAMETER name:xs index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun withVarargOfInt (vararg xs: kotlin.Int): kotlin.String declared in ' + CONST String type=kotlin.String value="" + FUN name:testAdaptedCR visibility:public modality:FINAL <> () returnType:kotlin.Unit + BLOCK_BODY + CALL 'public final fun useVararg (vararg foos: .IFoo): kotlin.Unit declared in ' type=kotlin.Unit origin=null + foos: VARARG type=kotlin.Array.IFoo> varargElementType=.IFoo + TYPE_OP type=.IFoo origin=SAM_CONVERSION typeOperand=.IFoo + BLOCK type=kotlin.reflect.KFunction1 origin=null + FUN ADAPTER_FOR_CALLABLE_REFERENCE name:withVarargOfInt visibility:local modality:FINAL <> (p0:kotlin.Int) returnType:kotlin.Unit + VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int + BLOCK_BODY + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + CALL 'public final fun withVarargOfInt (vararg xs: kotlin.Int): kotlin.String declared in ' type=kotlin.String origin=null + xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int + GET_VAR 'p0: kotlin.Int declared in .testAdaptedCR.withVarargOfInt' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun withVarargOfInt (p0: kotlin.Int): kotlin.Unit declared in .testAdaptedCR' type=kotlin.reflect.KFunction1 origin=null reflectionTarget=null diff --git a/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java b/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java index 8630feb05d0..ba0d1f869fb 100644 --- a/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java @@ -1499,6 +1499,11 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase { runTest("compiler/testData/ir/irText/expressions/funInterface/partialSam.kt"); } + @TestMetadata("samConversionInVarargs.kt") + public void testSamConversionInVarargs() throws Exception { + runTest("compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.kt"); + } + @TestMetadata("samConversionOnCallableReference.kt") public void testSamConversionOnCallableReference() throws Exception { runTest("compiler/testData/ir/irText/expressions/funInterface/samConversionOnCallableReference.kt");