Code style improvement

This commit is contained in:
Konstantin Anisimov
2017-06-15 17:56:42 +07:00
committed by KonstantinAnisimov
parent 7165f2edb5
commit 736d3fd876
@@ -206,7 +206,7 @@ class PackageFragmentPrinter(val packageFragment: KonanLinkData.PackageFragment,
//-------------------------------------------------------------------------// //-------------------------------------------------------------------------//
fun supertypesToString(supertypesId: List<Int>): String { fun supertypesToString(supertypesId: List<Int>): String {
val buff = StringBuilder(" : ") val buff = StringBuilder()
supertypesId.dropLast(1).forEach { supertypeId -> supertypesId.dropLast(1).forEach { supertypeId ->
val supertype = typeToString(supertypeId) val supertype = typeToString(supertypeId)
if (supertype != "Any") buff.append("$supertype, ") if (supertype != "Any") buff.append("$supertype, ")
@@ -216,8 +216,8 @@ class PackageFragmentPrinter(val packageFragment: KonanLinkData.PackageFragment,
if (supertype != "Any") buff.append(supertype) if (supertype != "Any") buff.append(supertype)
} }
if (buff.toString() == " : ") return "" if (buff.isEmpty()) return ""
return buff.toString() return " : " + buff.toString()
} }
//-------------------------------------------------------------------------// //-------------------------------------------------------------------------//