JVM IR: fix containing declaration for top level members in wrapped descriptors
In addition to fixing getContainingDeclaration, change origin of multifile facades to FILE_CLASS since the corresponding class descriptor should also be skipped when computing containing declaration. This fixes the problem with internal function calls in -Xmultifile-parts-inherit mode (previously we incorrectly mangled the function name in MethodSignatureMapper), and also fixes coroutine intrinsic calls when compiling kotlin-stdlib with JVM IR. In the latter case, all intrinsics (such as isBuiltInSuspendCoroutineUninterceptedOrReturn) are present in sources, and were previously not detected as intrinsics by the code in `generateInlineIntrinsic` because the FQ name didn't match: it had an additional component for the file class name.
This commit is contained in:
+5
@@ -16517,6 +16517,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/multifileClasses/optimized/calls.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("internalFunction.kt")
|
||||
public void testInternalFunction() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multifileClasses/optimized/internalFunction.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("overlappingFuns.kt")
|
||||
public void testOverlappingFuns() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multifileClasses/optimized/overlappingFuns.kt");
|
||||
|
||||
Reference in New Issue
Block a user