K2: add & fix tests for JVM BE diagnostics

This commit is contained in:
Mikhail Glukhikh
2022-10-14 09:46:22 +02:00
committed by Space Team
parent 185e74fd26
commit 1826d9b332
34 changed files with 972 additions and 188 deletions
@@ -76,7 +76,7 @@ open class KtDiagnosticReporterWithContext(
}
@OptIn(InternalDiagnosticFactoryMethod::class)
fun <A1 : Any, A2: Any> report(
fun <A1 : Any, A2 : Any> report(
factory: KtDiagnosticFactory2<A1, A2>,
a1: A1,
a2: A2,
@@ -85,6 +85,13 @@ open class KtDiagnosticReporterWithContext(
sourceElement?.let { report(factory.on(it, a1, a2, positioningStrategy), this) }
}
fun reportAndCommit(factory: KtDiagnosticFactory0) {
sourceElement?.let {
reportOn(it, factory, this)
checkAndCommitReportsOn(it, this)
}
}
fun <A : Any> reportAndCommit(factory: KtDiagnosticFactory1<A>, a: A) {
sourceElement?.let {
reportOn(it, factory, a, this)