[FIR] Add @Supress("unused") to debug and plugin-related declarations

This commit is contained in:
Ivan Kochurkin
2023-07-05 11:39:08 +02:00
committed by Space Team
parent 43b76f3c24
commit ee44bddaf9
3 changed files with 7 additions and 1 deletions
@@ -45,7 +45,7 @@ sealed class TowerGroupKind(val index: Byte) : Comparable<TowerGroupKind> {
class Local(depth: Int) : WithDepth(6, depth)
class ImplicitOrNonLocal(depth: Int, val kindForDebugSake: String) : WithDepth(7, depth)
class ImplicitOrNonLocal(depth: Int, @Suppress("unused") val kindForDebugSake: String) : WithDepth(7, depth)
class ContextReceiverGroup(depth: Int) : WithDepth(8, depth)
@@ -41,5 +41,9 @@ abstract class PredicateVisitor<P : AbstractPredicate<P>, R, D> {
}
}
// It can be used externally by plugins
@Suppress("unused")
typealias DeclarationPredicateVisitor<R, D> = PredicateVisitor<DeclarationPredicate, R, D>
// It can be used externally by plugins
@Suppress("unused")
typealias LookupPredicateVisitor<R, D> = PredicateVisitor<LookupPredicate, R, D>
@@ -9,6 +9,8 @@ import org.jetbrains.kotlin.fir.tree.generator.context.AbstractFirTreeBuilder
import org.jetbrains.kotlin.fir.tree.generator.model.Implementation
import java.io.File
// It's used to generate a graph in dot format (it's useful for debugging)
@Suppress("unused")
fun printHierarchyGraph(builder: AbstractFirTreeBuilder) {
fun Implementation.Kind.toColor(): String = when (this) {
Implementation.Kind.Interface -> "green"