FIR IDE: Make KtFirReference implement KtSymbolBasedReference

Co-authored-by: Ilya Kirillov <ilya.kirillov@jetbrains.com>
This commit is contained in:
Roman Golyshev
2020-07-08 20:16:26 +03:00
committed by Ilya Kirillov
parent 2eb439899e
commit a4a2d92c08
2 changed files with 3 additions and 4 deletions
@@ -19,6 +19,6 @@ fun KtReference.resolveToSymbols(analysisSession: KtAnalysisSession): Collection
}
fun KtSimpleReference<*>.resolveToSymbol(analysisSession: KtAnalysisSession): KtSymbol? {
check(this is KtSymbolBasedReference) { "To get reference symbol the one should be KtSymbolBasedReference" }
check(this is KtSymbolBasedReference) { "To get reference symbol the one should be KtSymbolBasedReference but was ${this::class}" }
return resolveToSymbols(analysisSession).singleOrNull()
}