Don't add name mangling to top-level internal functions

Turns out kotlinc only adds this sort of name mangling to class member functions
This commit is contained in:
Chris Smowton
2022-12-02 17:38:16 +00:00
parent edfcc0cd6d
commit ff4baf096f
4 changed files with 10 additions and 1 deletions

View File

@@ -821,7 +821,7 @@ open class KotlinUsesExtractor(
OperatorNameConventions.INVOKE.asString())
fun getSuffixIfInternal() =
if (f.visibility == DescriptorVisibilities.INTERNAL && f !is IrConstructor) {
if (f.visibility == DescriptorVisibilities.INTERNAL && f !is IrConstructor && !(f.parent is IrFile || isExternalFileClassMember(f))) {
"\$" + getJvmModuleName(f)
} else {
""