Generate multi-files facade even if it's empty
It still contains useful information about it's parts, that may be used while building stubs for multi-file group containing only InlineOnly functions
This commit is contained in:
@@ -113,7 +113,7 @@ class MultifileClassCodegen(
|
||||
|
||||
generateDelegatesToPreviouslyCompiledParts(generateCallableMemberTasks, partFqNames)
|
||||
|
||||
if (!generateCallableMemberTasks.isEmpty()) {
|
||||
if (!partFqNames.isEmpty()) {
|
||||
generateMultifileFacadeClass(generateCallableMemberTasks, partFqNames)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
@file:[JvmName("Foo") JvmMultifileClass]
|
||||
package test
|
||||
|
||||
// This test checks that we generate empty multi-file facade even if there is no delegates within it (only private functions in packages)
|
||||
private fun privateOnly() {}
|
||||
@@ -0,0 +1,9 @@
|
||||
@kotlin.Metadata
|
||||
@kotlin.jvm.internal.KotlinMultifileClass
|
||||
public final class test/Foo
|
||||
|
||||
@kotlin.Metadata
|
||||
@kotlin.jvm.internal.KotlinMultifileClassPart
|
||||
synthetic final class test/Foo__EmptyMultifileFacadeKt {
|
||||
private final static method privateOnly(): void
|
||||
}
|
||||
@@ -41,6 +41,12 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("emptyMultifileFacade.kt")
|
||||
public void testEmptyMultifileFacade() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/emptyMultifileFacade.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("inlineOnly.kt")
|
||||
public void testInlineOnly() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/inlineOnly.kt");
|
||||
|
||||
Reference in New Issue
Block a user