[FIR] Introduce extended checkers for inspection-like diagnostics

This commit is contained in:
vladislavf7@gmail.com
2020-07-06 15:06:02 +03:00
committed by Mikhail Glukhikh
parent 4643d483a0
commit be684c784f
13 changed files with 67 additions and 50 deletions
@@ -0,0 +1,10 @@
/*
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.fir
abstract class AbstractExtendedFirDiagnosticsTest : AbstractFirDiagnosticsTest() {
override fun useExtendedCheckersIfNeeded(): Boolean = true
}
@@ -276,7 +276,7 @@ abstract class AbstractFirDiagnosticsTest : AbstractFirBaseDiagnosticsTest() {
}
private fun createCollector(session: FirSession): AbstractDiagnosticCollector {
return FirDiagnosticsCollector.create(session)
return FirDiagnosticsCollector.create(session, useExtendedCheckersIfNeeded())
}
private fun checkCfgDump(testDataFile: File, firFiles: List<FirFile>) {
@@ -359,4 +359,6 @@ abstract class AbstractFirDiagnosticsTest : AbstractFirBaseDiagnosticsTest() {
}
}
internal open fun useExtendedCheckersIfNeeded() = false
}