diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java index 6a59a99044b..6b9b4ca1589 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java @@ -15788,6 +15788,12 @@ public class LLFirBlackBoxCodegenBasedTestGenerated extends AbstractLLFirBlackBo runTest("compiler/testData/codegen/box/delegatedProperty/beforeDeclarationContainerOptimization.kt"); } + @Test + @TestMetadata("callableReferenceAsSecondArgumentOfDelegate.kt") + public void testCallableReferenceAsSecondArgumentOfDelegate() throws Exception { + runTest("compiler/testData/codegen/box/delegatedProperty/callableReferenceAsSecondArgumentOfDelegate.kt"); + } + @Test @TestMetadata("capturePropertyInClosure.kt") public void testCapturePropertyInClosure() throws Exception { diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java index 96d27ad410d..afca87f4438 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java @@ -15788,6 +15788,12 @@ public class LLFirReversedBlackBoxCodegenBasedTestGenerated extends AbstractLLFi runTest("compiler/testData/codegen/box/delegatedProperty/beforeDeclarationContainerOptimization.kt"); } + @Test + @TestMetadata("callableReferenceAsSecondArgumentOfDelegate.kt") + public void testCallableReferenceAsSecondArgumentOfDelegate() throws Exception { + runTest("compiler/testData/codegen/box/delegatedProperty/callableReferenceAsSecondArgumentOfDelegate.kt"); + } + @Test @TestMetadata("capturePropertyInClosure.kt") public void testCapturePropertyInClosure() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java index 25adfb94122..1281d6cb60d 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java @@ -15789,6 +15789,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr runTest("compiler/testData/codegen/box/delegatedProperty/beforeDeclarationContainerOptimization.kt"); } + @Test + @TestMetadata("callableReferenceAsSecondArgumentOfDelegate.kt") + public void testCallableReferenceAsSecondArgumentOfDelegate() throws Exception { + runTest("compiler/testData/codegen/box/delegatedProperty/callableReferenceAsSecondArgumentOfDelegate.kt"); + } + @Test @TestMetadata("capturePropertyInClosure.kt") public void testCapturePropertyInClosure() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java index 57101ddcecb..ee0fa75d2a9 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java @@ -15789,6 +15789,12 @@ public class FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated runTest("compiler/testData/codegen/box/delegatedProperty/beforeDeclarationContainerOptimization.kt"); } + @Test + @TestMetadata("callableReferenceAsSecondArgumentOfDelegate.kt") + public void testCallableReferenceAsSecondArgumentOfDelegate() throws Exception { + runTest("compiler/testData/codegen/box/delegatedProperty/callableReferenceAsSecondArgumentOfDelegate.kt"); + } + @Test @TestMetadata("capturePropertyInClosure.kt") public void testCapturePropertyInClosure() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java index feea7086096..210a3a33c5f 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java @@ -15789,6 +15789,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo runTest("compiler/testData/codegen/box/delegatedProperty/beforeDeclarationContainerOptimization.kt"); } + @Test + @TestMetadata("callableReferenceAsSecondArgumentOfDelegate.kt") + public void testCallableReferenceAsSecondArgumentOfDelegate() throws Exception { + runTest("compiler/testData/codegen/box/delegatedProperty/callableReferenceAsSecondArgumentOfDelegate.kt"); + } + @Test @TestMetadata("capturePropertyInClosure.kt") public void testCapturePropertyInClosure() throws Exception { 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 cab7720e75e..20fb563a4b1 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 @@ -53,6 +53,7 @@ import org.jetbrains.kotlin.resolve.calls.inference.buildCurrentSubstitutor import org.jetbrains.kotlin.resolve.calls.inference.components.TypeVariableDirectionCalculator import org.jetbrains.kotlin.resolve.calls.inference.model.ProvideDelegateFixationPosition import org.jetbrains.kotlin.types.model.TypeConstructorMarker +import org.jetbrains.kotlin.util.OperatorNameConventions import org.jetbrains.kotlin.util.PrivateForInline import org.jetbrains.kotlin.utils.exceptions.requireWithAttachment @@ -323,7 +324,13 @@ open class FirDeclarationsResolveTransformer( (property.setter?.body?.statements?.singleOrNull() as? FirReturnExpression)?.let { returnExpression -> (returnExpression.result as? FirFunctionCall)?.replacePropertyReferenceTypeInDelegateAccessors(property) } - (property.delegate as? FirFunctionCall)?.replacePropertyReferenceTypeInDelegateAccessors(property) + val delegate = property.delegate + if (delegate is FirFunctionCall && + delegate.calleeReference.name == OperatorNameConventions.PROVIDE_DELEGATE && + delegate.source?.kind == KtFakeSourceElementKind.DelegatedPropertyAccessor + ) { + delegate.replacePropertyReferenceTypeInDelegateAccessors(property) + } } private fun transformPropertyAccessorsWithDelegate( diff --git a/compiler/testData/codegen/box/delegatedProperty/callableReferenceAsSecondArgumentOfDelegate.kt b/compiler/testData/codegen/box/delegatedProperty/callableReferenceAsSecondArgumentOfDelegate.kt new file mode 100644 index 00000000000..7d7d78acbb5 --- /dev/null +++ b/compiler/testData/codegen/box/delegatedProperty/callableReferenceAsSecondArgumentOfDelegate.kt @@ -0,0 +1,23 @@ +// WITH_STDLIB +// ISSUE: KT-65165 + +import kotlin.properties.ReadOnlyProperty +import kotlin.reflect.KProperty + +private class TransformedConfigPropertyString( + defaultValue: String, + private val transform: (String) -> Regex +) : ReadOnlyProperty { + override fun getValue(thisRef: SampleClass, property: KProperty<*>): Regex { + return transform("string") + } +} + +class SampleClass { + val ignoreStringsRegex: Regex by TransformedConfigPropertyString("$^", String::toRegex) +} + +fun box(): String { + SampleClass().ignoreStringsRegex + return "OK" +} \ No newline at end of file diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java index 2d4f48a3bb7..77ac21b4904 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java @@ -15789,6 +15789,12 @@ public class JvmAbiConsistencyTestBoxGenerated extends AbstractJvmAbiConsistency runTest("compiler/testData/codegen/box/delegatedProperty/beforeDeclarationContainerOptimization.kt"); } + @Test + @TestMetadata("callableReferenceAsSecondArgumentOfDelegate.kt") + public void testCallableReferenceAsSecondArgumentOfDelegate() throws Exception { + runTest("compiler/testData/codegen/box/delegatedProperty/callableReferenceAsSecondArgumentOfDelegate.kt"); + } + @Test @TestMetadata("capturePropertyInClosure.kt") public void testCapturePropertyInClosure() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java index 3ce6d50701c..338b5f3dfdc 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java @@ -15423,6 +15423,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/delegatedProperty/beforeDeclarationContainerOptimization.kt"); } + @Test + @TestMetadata("callableReferenceAsSecondArgumentOfDelegate.kt") + public void testCallableReferenceAsSecondArgumentOfDelegate() throws Exception { + runTest("compiler/testData/codegen/box/delegatedProperty/callableReferenceAsSecondArgumentOfDelegate.kt"); + } + @Test @TestMetadata("capturePropertyInClosure.kt") public void testCapturePropertyInClosure() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java index 030130175f7..2fd718742aa 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java @@ -15789,6 +15789,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/delegatedProperty/beforeDeclarationContainerOptimization.kt"); } + @Test + @TestMetadata("callableReferenceAsSecondArgumentOfDelegate.kt") + public void testCallableReferenceAsSecondArgumentOfDelegate() throws Exception { + runTest("compiler/testData/codegen/box/delegatedProperty/callableReferenceAsSecondArgumentOfDelegate.kt"); + } + @Test @TestMetadata("capturePropertyInClosure.kt") public void testCapturePropertyInClosure() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java index 305d7164f10..ab0c98fd92d 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java @@ -15789,6 +15789,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack runTest("compiler/testData/codegen/box/delegatedProperty/beforeDeclarationContainerOptimization.kt"); } + @Test + @TestMetadata("callableReferenceAsSecondArgumentOfDelegate.kt") + public void testCallableReferenceAsSecondArgumentOfDelegate() throws Exception { + runTest("compiler/testData/codegen/box/delegatedProperty/callableReferenceAsSecondArgumentOfDelegate.kt"); + } + @Test @TestMetadata("capturePropertyInClosure.kt") public void testCapturePropertyInClosure() throws Exception { diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 1d331f1ad03..dbd3d841a3a 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -13005,6 +13005,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/delegatedProperty/beforeDeclarationContainerOptimization.kt"); } + @TestMetadata("callableReferenceAsSecondArgumentOfDelegate.kt") + public void testCallableReferenceAsSecondArgumentOfDelegate() throws Exception { + runTest("compiler/testData/codegen/box/delegatedProperty/callableReferenceAsSecondArgumentOfDelegate.kt"); + } + @TestMetadata("capturePropertyInClosure.kt") public void testCapturePropertyInClosure() throws Exception { runTest("compiler/testData/codegen/box/delegatedProperty/capturePropertyInClosure.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java index 9a36db44983..c4d4ac1f6f7 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java @@ -11889,6 +11889,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest { runTest("compiler/testData/codegen/box/delegatedProperty/beforeDeclarationContainerOptimization.kt"); } + @Test + @TestMetadata("callableReferenceAsSecondArgumentOfDelegate.kt") + public void testCallableReferenceAsSecondArgumentOfDelegate() throws Exception { + runTest("compiler/testData/codegen/box/delegatedProperty/callableReferenceAsSecondArgumentOfDelegate.kt"); + } + @Test @TestMetadata("capturePropertyInClosure.kt") public void testCapturePropertyInClosure() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java index 402a759e94a..41b85f90a65 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java @@ -11889,6 +11889,12 @@ public class FirJsES6CodegenBoxTestGenerated extends AbstractFirJsES6CodegenBoxT runTest("compiler/testData/codegen/box/delegatedProperty/beforeDeclarationContainerOptimization.kt"); } + @Test + @TestMetadata("callableReferenceAsSecondArgumentOfDelegate.kt") + public void testCallableReferenceAsSecondArgumentOfDelegate() throws Exception { + runTest("compiler/testData/codegen/box/delegatedProperty/callableReferenceAsSecondArgumentOfDelegate.kt"); + } + @Test @TestMetadata("capturePropertyInClosure.kt") public void testCapturePropertyInClosure() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java index 3f6af4aca58..03342bb7d6f 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java @@ -11889,6 +11889,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/delegatedProperty/beforeDeclarationContainerOptimization.kt"); } + @Test + @TestMetadata("callableReferenceAsSecondArgumentOfDelegate.kt") + public void testCallableReferenceAsSecondArgumentOfDelegate() throws Exception { + runTest("compiler/testData/codegen/box/delegatedProperty/callableReferenceAsSecondArgumentOfDelegate.kt"); + } + @Test @TestMetadata("capturePropertyInClosure.kt") public void testCapturePropertyInClosure() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java index bf10e5d39c7..62f71a345cf 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java @@ -11889,6 +11889,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes runTest("compiler/testData/codegen/box/delegatedProperty/beforeDeclarationContainerOptimization.kt"); } + @Test + @TestMetadata("callableReferenceAsSecondArgumentOfDelegate.kt") + public void testCallableReferenceAsSecondArgumentOfDelegate() throws Exception { + runTest("compiler/testData/codegen/box/delegatedProperty/callableReferenceAsSecondArgumentOfDelegate.kt"); + } + @Test @TestMetadata("capturePropertyInClosure.kt") public void testCapturePropertyInClosure() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java index f4ef2f8dbea..037fff20f2e 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java @@ -13361,6 +13361,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe runTest("compiler/testData/codegen/box/delegatedProperty/beforeDeclarationContainerOptimization.kt"); } + @Test + @TestMetadata("callableReferenceAsSecondArgumentOfDelegate.kt") + public void testCallableReferenceAsSecondArgumentOfDelegate() throws Exception { + runTest("compiler/testData/codegen/box/delegatedProperty/callableReferenceAsSecondArgumentOfDelegate.kt"); + } + @Test @TestMetadata("capturePropertyInClosure.kt") public void testCapturePropertyInClosure() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java index d73d766f7fe..f98f508b102 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java @@ -13669,6 +13669,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB runTest("compiler/testData/codegen/box/delegatedProperty/beforeDeclarationContainerOptimization.kt"); } + @Test + @TestMetadata("callableReferenceAsSecondArgumentOfDelegate.kt") + public void testCallableReferenceAsSecondArgumentOfDelegate() throws Exception { + runTest("compiler/testData/codegen/box/delegatedProperty/callableReferenceAsSecondArgumentOfDelegate.kt"); + } + @Test @TestMetadata("capturePropertyInClosure.kt") public void testCapturePropertyInClosure() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java index 9994b8691b6..051332347f7 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java @@ -13053,6 +13053,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/delegatedProperty/beforeDeclarationContainerOptimization.kt"); } + @Test + @TestMetadata("callableReferenceAsSecondArgumentOfDelegate.kt") + public void testCallableReferenceAsSecondArgumentOfDelegate() throws Exception { + runTest("compiler/testData/codegen/box/delegatedProperty/callableReferenceAsSecondArgumentOfDelegate.kt"); + } + @Test @TestMetadata("capturePropertyInClosure.kt") public void testCapturePropertyInClosure() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java index 68c15b3a6f6..7d9e1de9bd4 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java @@ -13362,6 +13362,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT runTest("compiler/testData/codegen/box/delegatedProperty/beforeDeclarationContainerOptimization.kt"); } + @Test + @TestMetadata("callableReferenceAsSecondArgumentOfDelegate.kt") + public void testCallableReferenceAsSecondArgumentOfDelegate() throws Exception { + runTest("compiler/testData/codegen/box/delegatedProperty/callableReferenceAsSecondArgumentOfDelegate.kt"); + } + @Test @TestMetadata("capturePropertyInClosure.kt") public void testCapturePropertyInClosure() throws Exception { diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmJsCodegenBoxTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmJsCodegenBoxTestGenerated.java index 67008de3391..d05c2d0da30 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmJsCodegenBoxTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmJsCodegenBoxTestGenerated.java @@ -11865,6 +11865,12 @@ public class FirWasmJsCodegenBoxTestGenerated extends AbstractFirWasmJsCodegenBo runTest("compiler/testData/codegen/box/delegatedProperty/beforeDeclarationContainerOptimization.kt"); } + @Test + @TestMetadata("callableReferenceAsSecondArgumentOfDelegate.kt") + public void testCallableReferenceAsSecondArgumentOfDelegate() throws Exception { + runTest("compiler/testData/codegen/box/delegatedProperty/callableReferenceAsSecondArgumentOfDelegate.kt"); + } + @Test @TestMetadata("capturePropertyInClosure.kt") public void testCapturePropertyInClosure() throws Exception { diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java index 5b604baece5..682f09e7284 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java @@ -11865,6 +11865,12 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest runTest("compiler/testData/codegen/box/delegatedProperty/beforeDeclarationContainerOptimization.kt"); } + @Test + @TestMetadata("callableReferenceAsSecondArgumentOfDelegate.kt") + public void testCallableReferenceAsSecondArgumentOfDelegate() throws Exception { + runTest("compiler/testData/codegen/box/delegatedProperty/callableReferenceAsSecondArgumentOfDelegate.kt"); + } + @Test @TestMetadata("capturePropertyInClosure.kt") public void testCapturePropertyInClosure() throws Exception {