From 310f4e3491c2ff1b49847f4d5e0f06c7b74a682b Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Tue, 3 Sep 2024 13:27:56 +0100 Subject: [PATCH] KE2: Emit methods --- .../src/main/kotlin/KotlinUsesExtractor.kt | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/java/kotlin-extractor2/src/main/kotlin/KotlinUsesExtractor.kt b/java/kotlin-extractor2/src/main/kotlin/KotlinUsesExtractor.kt index 7d631c4873e..96d4da9b9a7 100644 --- a/java/kotlin-extractor2/src/main/kotlin/KotlinUsesExtractor.kt +++ b/java/kotlin-extractor2/src/main/kotlin/KotlinUsesExtractor.kt @@ -2001,12 +2001,11 @@ OLD: KE1 argsIncludingOuterClasses: List? */ ): ClassLabelResults { - TODO() + val pkg = c.classId.packageFqName.asString() + val cls = c.classId.relativeClassName.asString() + val label = /* OLD: KE1 - val pkg = c.packageFqName?.asString() ?: "" - val cls = c.name.asString() - val label = if (c.isAnonymousObject) "{${useAnonymousClass(c).javaResult.id}}" else when (val parent = c.parent) { @@ -2020,7 +2019,10 @@ OLD: KE1 "{${useField(parent)}}.$cls" } else -> { +*/ if (pkg.isEmpty()) cls else "$pkg.$cls" +/* +OLD: KE1 } } @@ -2038,12 +2040,15 @@ OLD: KE1 it.shortName } val shortNamePrefix = if (c.isAnonymousObject) "" else cls +*/ return ClassLabelResults( - label + (typeArgLabels?.joinToString(separator = "") { ";{${it.id}}" } ?: "<>"), + label // OLD: KE1: + (typeArgLabels?.joinToString(separator = "") { ";{${it.id}}" } ?: "<>"), +/* +OLD: KE1 shortNamePrefix + typeArgsShortName - ) */ + ) } /*