FIR: fix FQ_NAMES_IN_TYPES renderer

This commit is contained in:
Mikhail Glukhikh
2021-04-02 15:11:02 +03:00
parent 761a0a7d0d
commit e7102cd63f
3 changed files with 4 additions and 6 deletions
@@ -12,7 +12,6 @@ import org.jetbrains.kotlin.fir.FirElement
import org.jetbrains.kotlin.fir.FirRenderer
import org.jetbrains.kotlin.fir.declarations.*
import org.jetbrains.kotlin.fir.render
import org.jetbrains.kotlin.fir.renderWithType
import org.jetbrains.kotlin.fir.symbols.AbstractFirBasedSymbol
import org.jetbrains.kotlin.fir.symbols.impl.*
import org.jetbrains.kotlin.fir.types.ConeKotlinType
@@ -86,7 +85,7 @@ object FirDiagnosticRenderers {
}
val FQ_NAMES_IN_TYPES = Renderer { element: FirElement ->
element.renderWithType(mode = FirRenderer.RenderMode.WithFqNamesExceptAnnotation)
element.render(mode = FirRenderer.RenderMode.WithFqNamesExceptAnnotationAndBody)
}
val AMBIGUOUS_CALLS = Renderer { candidates: Collection<AbstractFirBasedSymbol<*>> ->
@@ -74,12 +74,13 @@ class FirRenderer(builder: StringBuilder, private val mode: RenderMode = RenderM
renderAnnotation = true,
)
object WithFqNamesExceptAnnotation : RenderMode(
object WithFqNamesExceptAnnotationAndBody : RenderMode(
renderLambdaBodies = true,
renderCallArguments = true,
renderCallableFqNames = true,
renderDeclarationResolvePhase = false,
renderAnnotation = false,
renderBodies = false,
)
object WithResolvePhases : RenderMode(
@@ -4,6 +4,4 @@ fun x() {
fun foo(){}
// CALL: KtFunctionCall: targetFunction = ERR<Too many arguments for org.jetbrains.kotlin.fir.declarations.impl.FirSimpleFunctionImpl@5f1f1786: public final fun /foo(): R|kotlin/Unit| {
}
, [/foo(): kotlin.Unit]>
// CALL: KtFunctionCall: targetFunction = ERR<Too many arguments for public final fun /foo(): R|kotlin/Unit|, [/foo(): kotlin.Unit]>