From 7f7801a7bc9f55e6f0469b092861aa0e0290ba7b Mon Sep 17 00:00:00 2001 From: Roman Efremov Date: Tue, 17 Oct 2023 11:46:37 +0200 Subject: [PATCH] [FIR] Use idRenderer to render ClassId in qualifiers It shouldn't break existing usages, because 1) default `ConeIdRendererForDebugging` renders ClassId in same way as before the change; 2) I didn't find any usages, which use non-default idRenderer, but rely on full ClassId be rendered for qualifiers. ^KT-62585 --- .../tree/src/org/jetbrains/kotlin/fir/renderer/FirRenderer.kt | 2 +- .../annotationMatching/annotationArgRendering.fir.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/renderer/FirRenderer.kt b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/renderer/FirRenderer.kt index ce0cc554864..79a37a11b6f 100644 --- a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/renderer/FirRenderer.kt +++ b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/renderer/FirRenderer.kt @@ -1183,7 +1183,7 @@ class FirRenderer( print("Q|") val classId = resolvedQualifier.classId if (classId != null) { - print(classId.asString()) + idRenderer.renderClassId(classId) } else { print(resolvedQualifier.packageFqName.asString().replace(".", "/")) } diff --git a/compiler/testData/diagnostics/tests/multiplatform/annotationMatching/annotationArgRendering.fir.kt b/compiler/testData/diagnostics/tests/multiplatform/annotationMatching/annotationArgRendering.fir.kt index 71455c009f5..445ab9ad16c 100644 --- a/compiler/testData/diagnostics/tests/multiplatform/annotationMatching/annotationArgRendering.fir.kt +++ b/compiler/testData/diagnostics/tests/multiplatform/annotationMatching/annotationArgRendering.fir.kt @@ -14,7 +14,7 @@ expect fun onType(): @Ann2("") Any? // MODULE: m1-jvm()()(m1-common) // FILE: jvm.kt -actual annotation class Ann +actual annotation class Ann actual fun stringConcat() {}