diff --git a/klib/src/main/kotlin/org/jetbrains/kotlin/cli/klib/PrettyPrinter.kt b/klib/src/main/kotlin/org/jetbrains/kotlin/cli/klib/PrettyPrinter.kt index e9b747b4f62..6c50f937af8 100644 --- a/klib/src/main/kotlin/org/jetbrains/kotlin/cli/klib/PrettyPrinter.kt +++ b/klib/src/main/kotlin/org/jetbrains/kotlin/cli/klib/PrettyPrinter.kt @@ -206,7 +206,7 @@ class PackageFragmentPrinter(val packageFragment: KonanLinkData.PackageFragment, //-------------------------------------------------------------------------// fun supertypesToString(supertypesId: List): String { - val buff = StringBuilder(" : ") + val buff = StringBuilder() supertypesId.dropLast(1).forEach { supertypeId -> val supertype = typeToString(supertypeId) if (supertype != "Any") buff.append("$supertype, ") @@ -216,8 +216,8 @@ class PackageFragmentPrinter(val packageFragment: KonanLinkData.PackageFragment, if (supertype != "Any") buff.append(supertype) } - if (buff.toString() == " : ") return "" - return buff.toString() + if (buff.isEmpty()) return "" + return " : " + buff.toString() } //-------------------------------------------------------------------------//