From d6bb1f2d4e65611a8bcc860544a61c6ac27bda8c Mon Sep 17 00:00:00 2001 From: Roman Artemev Date: Mon, 25 Jan 2021 16:02:54 +0300 Subject: [PATCH] [KLIB] Make `KotlinLibraryImpl` printable --- .../kotlin/library/impl/KotlinLibraryImpl.kt | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/compiler/util-klib/src/org/jetbrains/kotlin/library/impl/KotlinLibraryImpl.kt b/compiler/util-klib/src/org/jetbrains/kotlin/library/impl/KotlinLibraryImpl.kt index 6f1c3b0c853..bfd076d35ac 100644 --- a/compiler/util-klib/src/org/jetbrains/kotlin/library/impl/KotlinLibraryImpl.kt +++ b/compiler/util-klib/src/org/jetbrains/kotlin/library/impl/KotlinLibraryImpl.kt @@ -231,8 +231,21 @@ open class KotlinLibraryImpl( BaseKotlinLibrary by base, MetadataLibrary by metadata, IrLibrary by ir { - override fun toString(): String { - return "[Klib: ${base.libraryFile.name}, file: ${base.libraryFile.path}]" + override fun toString(): String = buildString { + append("name ") + append(base.libraryName) + append(", ") + append("file: ") + append(base.libraryFile.path) + append(", ") + append("version: ") + append(base.versions) + if (isInterop) { + append(", interop: true, ") + append("native targets: ") + nativeTargets.joinTo(this, ", ", "{", "}") + } + append(')') } }