From a14cab7245a5eedee560216324a78b601a587de9 Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Tue, 11 Oct 2022 11:11:38 +0300 Subject: [PATCH] [FIR] Add pretty toString to Candidate --- .../src/org/jetbrains/kotlin/fir/resolve/calls/Candidate.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/Candidate.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/Candidate.kt index c36efd71a1f..af94731ea43 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/Candidate.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/Candidate.kt @@ -123,6 +123,12 @@ class Candidate( override fun hashCode(): Int { return symbol.hashCode() } + + override fun toString(): String { + val okOrFail = if (applicability.isSuccess) "OK" else "FAIL" + val step = "$passedStages/${callInfo.callKind.resolutionSequence.size}" + return "$okOrFail($step): $symbol" + } } val Candidate.fullyAnalyzed: Boolean