From 90d012cecbf6bf492ed5dd1aaca9000ee244c16d Mon Sep 17 00:00:00 2001 From: Dmitry Petrov Date: Tue, 10 Mar 2020 13:36:52 +0300 Subject: [PATCH] Handle unbound extension receiver in callable reference adaptation --- .../kotlin/fir/Fir2IrTextTestGenerated.java | 5 ++ .../ReflectionReferencesGenerator.kt | 24 ++++-- .../varargAndDefaults/unboundReferences.kt | 1 - .../adaptedExtensionFunctions.fir.txt | 55 +++++++++++++ .../adaptedExtensionFunctions.kt | 23 ++++++ .../adaptedExtensionFunctions.txt | 79 +++++++++++++++++++ .../LightAnalysisModeTestGenerated.java | 10 +-- .../kotlin/ir/IrTextTestCaseGenerated.java | 5 ++ 8 files changed, 188 insertions(+), 14 deletions(-) create mode 100644 compiler/testData/ir/irText/expressions/callableReferences/adaptedExtensionFunctions.fir.txt create mode 100644 compiler/testData/ir/irText/expressions/callableReferences/adaptedExtensionFunctions.kt create mode 100644 compiler/testData/ir/irText/expressions/callableReferences/adaptedExtensionFunctions.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 d575f5a172e..c10530d43ae 100644 --- a/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/fir/Fir2IrTextTestGenerated.java +++ b/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/fir/Fir2IrTextTestGenerated.java @@ -1370,6 +1370,11 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest { KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.ANY, testDataFilePath, "// IGNORE_BACKEND_FIR: "); } + @TestMetadata("adaptedExtensionFunctions.kt") + public void testAdaptedExtensionFunctions() throws Exception { + runTest("compiler/testData/ir/irText/expressions/callableReferences/adaptedExtensionFunctions.kt"); + } + public void testAllFilesPresentInCallableReferences() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions/callableReferences"), Pattern.compile("^(.+)\\.kt$"), null, true); } diff --git a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ReflectionReferencesGenerator.kt b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ReflectionReferencesGenerator.kt index 93e9d33ec22..ac09e677cc6 100644 --- a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ReflectionReferencesGenerator.kt +++ b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ReflectionReferencesGenerator.kt @@ -275,18 +275,24 @@ class ReflectionReferencesGenerator(statementGenerator: StatementGenerator) : St throw AssertionError("Callable reference with adapted arguments expected: ${resolvedCall.call.callElement.text}") } + var shift = 0 if (resolvedCall.dispatchReceiver is TransientReceiver) { // Unbound callable reference 'A::foo', receiver is passed as a first parameter val irAdaptedReceiverParameter = irAdapterFun.valueParameters[0] irAdapteeCall.dispatchReceiver = IrGetValueImpl(startOffset, endOffset, irAdaptedReceiverParameter.type, irAdaptedReceiverParameter.symbol) + } else if (resolvedCall.extensionReceiver is TransientReceiver) { + val irAdaptedReceiverParameter = irAdapterFun.valueParameters[0] + irAdapteeCall.extensionReceiver = + IrGetValueImpl(startOffset, endOffset, irAdaptedReceiverParameter.type, irAdaptedReceiverParameter.symbol) + shift = 1 } for ((valueParameter, valueArgument) in adaptedArguments) { val substitutedValueParameter = resolvedCall.resultingDescriptor.valueParameters[valueParameter.index] irAdapteeCall.putValueArgument( valueParameter.index, - adaptResolvedValueArgument(startOffset, endOffset, valueArgument, irAdapterFun, substitutedValueParameter) + adaptResolvedValueArgument(startOffset, endOffset, valueArgument, irAdapterFun, substitutedValueParameter, shift) ) } } @@ -296,7 +302,8 @@ class ReflectionReferencesGenerator(statementGenerator: StatementGenerator) : St endOffset: Int, resolvedValueArgument: ResolvedValueArgument, irAdapterFun: IrSimpleFunction, - valueParameter: ValueParameterDescriptor + valueParameter: ValueParameterDescriptor, + shift: Int ): IrExpression? { return when (resolvedValueArgument) { is DefaultValueArgument -> @@ -306,34 +313,35 @@ class ReflectionReferencesGenerator(statementGenerator: StatementGenerator) : St startOffset, endOffset, valueParameter.type.toIrType(), valueParameter.varargElementType!!.toIrType(), resolvedValueArgument.arguments.map { - adaptValueArgument(startOffset, endOffset, it, irAdapterFun) + adaptValueArgument(startOffset, endOffset, it, irAdapterFun, shift) } ) is ExpressionValueArgument -> { val valueArgument = resolvedValueArgument.valueArgument!! - adaptValueArgument(startOffset, endOffset, valueArgument, irAdapterFun) as IrExpression + adaptValueArgument(startOffset, endOffset, valueArgument, irAdapterFun, shift) as IrExpression } else -> throw AssertionError("Unexpected ResolvedValueArgument: $resolvedValueArgument") } } - fun adaptValueArgument( + private fun adaptValueArgument( startOffset: Int, endOffset: Int, valueArgument: ValueArgument, - irAdapterFun: IrSimpleFunction + irAdapterFun: IrSimpleFunction, + shift: Int ): IrVarargElement = when (valueArgument) { is FakeImplicitSpreadValueArgumentForCallableReference -> IrSpreadElementImpl( startOffset, endOffset, - adaptValueArgument(startOffset, endOffset, valueArgument.expression, irAdapterFun) as IrExpression + adaptValueArgument(startOffset, endOffset, valueArgument.expression, irAdapterFun, shift) as IrExpression ) is FakePositionalValueArgumentForCallableReference -> { - val irAdapterParameter = irAdapterFun.valueParameters[valueArgument.index] + val irAdapterParameter = irAdapterFun.valueParameters[valueArgument.index + shift] IrGetValueImpl(startOffset, endOffset, irAdapterParameter.type, irAdapterParameter.symbol) } diff --git a/compiler/testData/codegen/box/callableReference/varargAndDefaults/unboundReferences.kt b/compiler/testData/codegen/box/callableReference/varargAndDefaults/unboundReferences.kt index 695418b2801..b655c39e66a 100644 --- a/compiler/testData/codegen/box/callableReference/varargAndDefaults/unboundReferences.kt +++ b/compiler/testData/codegen/box/callableReference/varargAndDefaults/unboundReferences.kt @@ -1,6 +1,5 @@ // !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType // IGNORE_BACKEND_FIR: JVM_IR -// IGNORE_BACKEND: JVM_IR, JS_IR // WITH_RUNTIME import kotlin.test.assertEquals diff --git a/compiler/testData/ir/irText/expressions/callableReferences/adaptedExtensionFunctions.fir.txt b/compiler/testData/ir/irText/expressions/callableReferences/adaptedExtensionFunctions.fir.txt new file mode 100644 index 00000000000..4bb1fc0c7b7 --- /dev/null +++ b/compiler/testData/ir/irText/expressions/callableReferences/adaptedExtensionFunctions.fir.txt @@ -0,0 +1,55 @@ +FILE fqName: fileName:/adaptedExtensionFunctions.kt + FUN name:use visibility:public modality:FINAL <> (f:kotlin.Function2<.C, kotlin.Int, kotlin.Unit>) returnType:kotlin.Unit + VALUE_PARAMETER name:f index:0 type:kotlin.Function2<.C, kotlin.Int, kotlin.Unit> + BLOCK_BODY + CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.C + CONSTRUCTOR visibility:public <> () returnType:.C [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]' + FUN 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:extensionVararg visibility:public modality:FINAL <> ($receiver:.C, i:kotlin.Int, s:kotlin.Array) returnType:kotlin.Unit + $receiver: VALUE_PARAMETER name: type:.C + VALUE_PARAMETER name:i index:0 type:kotlin.Int + VALUE_PARAMETER name:s index:1 type:kotlin.Array varargElementType:kotlin.String [vararg] + BLOCK_BODY + FUN name:extensionDefault visibility:public modality:FINAL <> ($receiver:.C, i:kotlin.Int, s:kotlin.String) returnType:kotlin.Unit + $receiver: VALUE_PARAMETER name: type:.C + VALUE_PARAMETER name:i index:0 type:kotlin.Int + VALUE_PARAMETER name:s index:1 type:kotlin.String + EXPRESSION_BODY + CONST String type=kotlin.String value="" + BLOCK_BODY + FUN name:extensionBoth visibility:public modality:FINAL <> ($receiver:.C, i:kotlin.Int, s:kotlin.String, t:kotlin.Array) returnType:kotlin.Unit + $receiver: VALUE_PARAMETER name: type:.C + VALUE_PARAMETER name:i index:0 type:kotlin.Int + VALUE_PARAMETER name:s index:1 type:kotlin.String + EXPRESSION_BODY + CONST String type=kotlin.String value="" + VALUE_PARAMETER name:t index:2 type:kotlin.Array varargElementType:kotlin.String [vararg] + BLOCK_BODY + FUN name:testExtensionVararg visibility:public modality:FINAL <> () returnType:kotlin.Unit + BLOCK_BODY + ERROR_CALL 'Unresolved reference: #' type=IrErrorType + FUNCTION_REFERENCE 'public final fun extensionVararg (i: kotlin.Int, vararg s: kotlin.String): kotlin.Unit declared in ' type=kotlin.reflect.KFunction3<.C, kotlin.Int, kotlin.Array, kotlin.Unit> origin=null reflectionTarget= + FUN name:testExtensionDefault visibility:public modality:FINAL <> () returnType:kotlin.Unit + BLOCK_BODY + CALL 'public final fun use (f: kotlin.Function2<.C, kotlin.Int, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null + f: FUNCTION_REFERENCE 'public final fun extensionDefault (i: kotlin.Int, s: kotlin.String): kotlin.Unit declared in ' type=kotlin.reflect.KFunction2<.C, kotlin.Int, kotlin.Unit> origin=null reflectionTarget= + FUN name:testExtensionBoth visibility:public modality:FINAL <> () returnType:kotlin.Unit + BLOCK_BODY + ERROR_CALL 'Unresolved reference: #' type=IrErrorType + FUNCTION_REFERENCE 'public final fun extensionBoth (i: kotlin.Int, s: kotlin.String, vararg t: kotlin.String): kotlin.Unit declared in ' type=kotlin.reflect.KFunction3<.C, kotlin.Int, kotlin.Array, kotlin.Unit> origin=null reflectionTarget= diff --git a/compiler/testData/ir/irText/expressions/callableReferences/adaptedExtensionFunctions.kt b/compiler/testData/ir/irText/expressions/callableReferences/adaptedExtensionFunctions.kt new file mode 100644 index 00000000000..4f28093a511 --- /dev/null +++ b/compiler/testData/ir/irText/expressions/callableReferences/adaptedExtensionFunctions.kt @@ -0,0 +1,23 @@ +// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType + +fun use(f: C.(Int) -> Unit) {} + +class C + +fun C.extensionVararg(i: Int, vararg s: String) {} + +fun C.extensionDefault(i: Int, s: String = "") {} + +fun C.extensionBoth(i: Int, s: String = "", vararg t: String) {} + +fun testExtensionVararg() { + use(C::extensionVararg) +} + +fun testExtensionDefault() { + use(C::extensionDefault) +} + +fun testExtensionBoth() { + use(C::extensionBoth) +} \ No newline at end of file diff --git a/compiler/testData/ir/irText/expressions/callableReferences/adaptedExtensionFunctions.txt b/compiler/testData/ir/irText/expressions/callableReferences/adaptedExtensionFunctions.txt new file mode 100644 index 00000000000..7b490a18b7e --- /dev/null +++ b/compiler/testData/ir/irText/expressions/callableReferences/adaptedExtensionFunctions.txt @@ -0,0 +1,79 @@ +FILE fqName: fileName:/adaptedExtensionFunctions.kt + FUN name:use visibility:public modality:FINAL <> (f:@[ExtensionFunctionType] kotlin.Function2<.C, kotlin.Int, kotlin.Unit>) returnType:kotlin.Unit + VALUE_PARAMETER name:f index:0 type:@[ExtensionFunctionType] kotlin.Function2<.C, kotlin.Int, kotlin.Unit> + BLOCK_BODY + CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.C + CONSTRUCTOR visibility:public <> () returnType:.C [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public superTypes:[kotlin.Any]' + FUN 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:extensionVararg visibility:public modality:FINAL <> ($receiver:.C, i:kotlin.Int, s:kotlin.Array) returnType:kotlin.Unit + $receiver: VALUE_PARAMETER name: type:.C + VALUE_PARAMETER name:i index:0 type:kotlin.Int + VALUE_PARAMETER name:s index:1 type:kotlin.Array varargElementType:kotlin.String [vararg] + BLOCK_BODY + FUN name:extensionDefault visibility:public modality:FINAL <> ($receiver:.C, i:kotlin.Int, s:kotlin.String) returnType:kotlin.Unit + $receiver: VALUE_PARAMETER name: type:.C + VALUE_PARAMETER name:i index:0 type:kotlin.Int + VALUE_PARAMETER name:s index:1 type:kotlin.String + EXPRESSION_BODY + CONST String type=kotlin.String value="" + BLOCK_BODY + FUN name:extensionBoth visibility:public modality:FINAL <> ($receiver:.C, i:kotlin.Int, s:kotlin.String, t:kotlin.Array) returnType:kotlin.Unit + $receiver: VALUE_PARAMETER name: type:.C + VALUE_PARAMETER name:i index:0 type:kotlin.Int + VALUE_PARAMETER name:s index:1 type:kotlin.String + EXPRESSION_BODY + CONST String type=kotlin.String value="" + VALUE_PARAMETER name:t index:2 type:kotlin.Array varargElementType:kotlin.String [vararg] + BLOCK_BODY + FUN name:testExtensionVararg visibility:public modality:FINAL <> () returnType:kotlin.Unit + BLOCK_BODY + CALL 'public final fun use (f: @[ExtensionFunctionType] kotlin.Function2<.C, kotlin.Int, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null + f: BLOCK type=kotlin.reflect.KFunction2<.C, kotlin.Int, kotlin.Unit> origin=null + FUN ADAPTER_FOR_CALLABLE_REFERENCE name:extensionVararg visibility:local modality:FINAL <> (p0:.C, p1:kotlin.Int) returnType:kotlin.Unit + VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:.C + VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p1 index:1 type:kotlin.Int + BLOCK_BODY + CALL 'public final fun extensionVararg (i: kotlin.Int, vararg s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null + $receiver: GET_VAR 'p0: .C declared in .testExtensionVararg.extensionVararg' type=.C origin=null + i: GET_VAR 'p1: kotlin.Int declared in .testExtensionVararg.extensionVararg' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun extensionVararg (p0: .C, p1: kotlin.Int): kotlin.Unit declared in .testExtensionVararg' type=kotlin.reflect.KFunction2<.C, kotlin.Int, kotlin.Unit> origin=null reflectionTarget=null + FUN name:testExtensionDefault visibility:public modality:FINAL <> () returnType:kotlin.Unit + BLOCK_BODY + CALL 'public final fun use (f: @[ExtensionFunctionType] kotlin.Function2<.C, kotlin.Int, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null + f: BLOCK type=kotlin.reflect.KFunction2<.C, kotlin.Int, kotlin.Unit> origin=null + FUN ADAPTER_FOR_CALLABLE_REFERENCE name:extensionDefault visibility:local modality:FINAL <> (p0:.C, p1:kotlin.Int) returnType:kotlin.Unit + VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:.C + VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p1 index:1 type:kotlin.Int + BLOCK_BODY + CALL 'public final fun extensionDefault (i: kotlin.Int, s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null + $receiver: GET_VAR 'p0: .C declared in .testExtensionDefault.extensionDefault' type=.C origin=null + i: GET_VAR 'p1: kotlin.Int declared in .testExtensionDefault.extensionDefault' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun extensionDefault (p0: .C, p1: kotlin.Int): kotlin.Unit declared in .testExtensionDefault' type=kotlin.reflect.KFunction2<.C, kotlin.Int, kotlin.Unit> origin=null reflectionTarget=null + FUN name:testExtensionBoth visibility:public modality:FINAL <> () returnType:kotlin.Unit + BLOCK_BODY + CALL 'public final fun use (f: @[ExtensionFunctionType] kotlin.Function2<.C, kotlin.Int, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null + f: BLOCK type=kotlin.reflect.KFunction2<.C, kotlin.Int, kotlin.Unit> origin=null + FUN ADAPTER_FOR_CALLABLE_REFERENCE name:extensionBoth visibility:local modality:FINAL <> (p0:.C, p1:kotlin.Int) returnType:kotlin.Unit + VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:.C + VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p1 index:1 type:kotlin.Int + BLOCK_BODY + CALL 'public final fun extensionBoth (i: kotlin.Int, s: kotlin.String, vararg t: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null + $receiver: GET_VAR 'p0: .C declared in .testExtensionBoth.extensionBoth' type=.C origin=null + i: GET_VAR 'p1: kotlin.Int declared in .testExtensionBoth.extensionBoth' type=kotlin.Int origin=null + FUNCTION_REFERENCE 'local final fun extensionBoth (p0: .C, p1: kotlin.Int): kotlin.Unit declared in .testExtensionBoth' type=kotlin.reflect.KFunction2<.C, kotlin.Int, kotlin.Unit> origin=null reflectionTarget=null diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 3b2cc70f24b..8e0ed08aaaa 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -14860,6 +14860,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SerializationRegressions extends AbstractLightAnalysisModeTest { + @TestMetadata("transitiveClash.kt") + public void ignoreTransitiveClash() throws Exception { + runTest("compiler/testData/codegen/box/ir/serializationRegressions/transitiveClash.kt"); + } + private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } @@ -14883,11 +14888,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/ir/serializationRegressions/innerClassInEnumEntryClass.kt"); } - @TestMetadata("transitiveClash.kt") - public void testTransitiveClash() throws Exception { - runTest("compiler/testData/codegen/box/ir/serializationRegressions/transitiveClash.kt"); - } - @TestMetadata("useImportedMember.kt") public void testUseImportedMember() throws Exception { runTest("compiler/testData/codegen/box/ir/serializationRegressions/useImportedMember.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java b/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java index aa98e3cf476..9b816b5c8a5 100644 --- a/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java @@ -1369,6 +1369,11 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } + @TestMetadata("adaptedExtensionFunctions.kt") + public void testAdaptedExtensionFunctions() throws Exception { + runTest("compiler/testData/ir/irText/expressions/callableReferences/adaptedExtensionFunctions.kt"); + } + public void testAllFilesPresentInCallableReferences() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions/callableReferences"), Pattern.compile("^(.+)\\.kt$"), null, true); }