FIR IDE: introduce withFir function

This commit is contained in:
Ilya Kirillov
2020-09-22 16:00:36 +03:00
parent a516264923
commit f36cd28696
@@ -64,6 +64,11 @@ object LowLevelFirApiFacade {
return action(firDeclaration)
}
inline fun <F : FirElement, R> withFir(fir: F, action: (F) -> R): R {
// TODO locking
return action(fir)
}
fun getDiagnosticsFor(element: KtElement, resolveState: FirModuleResolveState): Collection<Diagnostic> =
resolveState.getDiagnostics(element)