Fix accessor generation for suspend functions
1. JVM view of suspend accessors must be also an instance of AccessorForFunctionDescriptor, thus `createSubstitutedCopy` should be correctly overidden. 2. accessibleFunctionDescriptor should unwap the initial suspend descriptor, for the same reasons as for type aliases constructors and etc: these descriptors are used as keys of the map of accessors, so to avoid duplication for suspend view and initial suspend descriptor, we always use the latter one as a key. #KT-15907 Fixed #KT-15935 Fixed
This commit is contained in:
+12
@@ -5179,6 +5179,18 @@ public class LightAnalysisModeCodegenTestGenerated extends AbstractLightAnalysis
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("privateFunctions.kt")
|
||||
public void testPrivateFunctions() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/privateFunctions.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("privateInFile.kt")
|
||||
public void testPrivateInFile() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/privateInFile.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("returnNoSuspend.kt")
|
||||
public void testReturnNoSuspend() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/returnNoSuspend.kt");
|
||||
|
||||
Reference in New Issue
Block a user