[VISUALIZER] Replace rendering of class with no name to anonymous
This commit is contained in:
committed by
TeamCityServer
parent
ca424a94ef
commit
813e48ffb4
+2
@@ -13,6 +13,7 @@ import org.jetbrains.kotlin.compiler.visualizer.Annotator.annotate
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.descriptors.impl.AnonymousFunctionDescriptor
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.name.SpecialNames
|
||||
import org.jetbrains.kotlin.psi.*
|
||||
import org.jetbrains.kotlin.psi.psiUtil.getChildOfType
|
||||
import org.jetbrains.kotlin.renderer.ClassifierNamePolicy
|
||||
@@ -257,6 +258,7 @@ class PsiVisualizer(private val file: KtFile, analysisResult: AnalysisResult) :
|
||||
}
|
||||
|
||||
fun renderType(type: KotlinType): String {
|
||||
if (type.toString() == SpecialNames.NO_NAME_PROVIDED.asString()) return "<anonymous>"
|
||||
return typeRenderer.renderType(type)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user