[FIR] Use idRenderer to print referenced class and callable ids
...in `ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT` diagnostic message. Unlike in previous commit, this can't be fixed right in `FirSymbolRenderer`, because `ConeIdRendererForDebugging` renders differently and a lot of lazy resolve tests rely on that. ^KT-62585
This commit is contained in:
committed by
Space Team
parent
7f7801a7bc
commit
37a0dd9487
+20
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.fir.renderer
|
||||
|
||||
import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirCallableSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirClassLikeSymbol
|
||||
|
||||
class FirIdRendererBasedSymbolRenderer : FirSymbolRenderer() {
|
||||
override fun printReference(symbol: FirBasedSymbol<*>) {
|
||||
when (symbol) {
|
||||
is FirCallableSymbol<*> -> components.idRenderer.renderCallableId(symbol.callableId)
|
||||
is FirClassLikeSymbol<*> -> components.idRenderer.renderClassId(symbol.classId)
|
||||
else -> super.printReference(symbol)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ open class FirSymbolRenderer {
|
||||
internal lateinit var components: FirRendererComponents
|
||||
protected val printer get() = components.printer
|
||||
|
||||
fun printReference(symbol: FirBasedSymbol<*>) {
|
||||
open fun printReference(symbol: FirBasedSymbol<*>) {
|
||||
printer.print(renderReference(symbol))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user