[FIR] Fix incorrect updating of callable reference type in delegated property
... if the delegate happens to be a function call whose second argument is a callable reference but not actually a provideDelegate call. The fix is to ensure that the call is _actually_ a desugared provideDelegate call. This fixes a CCE in a case where the delegate expression is a regular function call and the second argument is a callable reference. #KT-65165 Fixed
This commit is contained in:
committed by
Space Team
parent
fced126c9f
commit
853ad54699
+6
@@ -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 {
|
||||
|
||||
+6
@@ -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 {
|
||||
|
||||
+6
@@ -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 {
|
||||
|
||||
+6
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user