Add flag to force loading old inference diagnostics

This commit is contained in:
Mikhail Zarechenskiy
2017-10-27 11:31:57 +03:00
parent 6486c8dccc
commit 0410287cf9
@@ -217,7 +217,7 @@ abstract class BaseDiagnosticsTest : KotlinMultiFileTestWithJava<TestModule, Tes
computeJvmSignatureDiagnostics(bindingContext)
val ok = booleanArrayOf(true)
val withNewInference = newInferenceEnabled && withNewInferenceDirective
val withNewInference = newInferenceEnabled && withNewInferenceDirective && !USE_OLD_INFERENCE_DIAGNOSTICS_FOR_NI
val diagnostics = ContainerUtil.filter(
CheckerTestUtil.getDiagnosticsIncludingSyntaxErrors(
bindingContext, implementingModulesBindings, ktFile, markDynamicCalls, dynamicCallDescriptors, withNewInference
@@ -324,6 +324,9 @@ abstract class BaseDiagnosticsTest : KotlinMultiFileTestWithJava<TestModule, Tes
val WITH_NEW_INFERENCE_DIRECTIVE = "WITH_NEW_INFERENCE"
// Change it to "true" to load diagnostics for old inference to test new inference (ignore diagnostics with <NI; prefix)
private val USE_OLD_INFERENCE_DIAGNOSTICS_FOR_NI = false
private fun parseDiagnosticFilterDirective(directiveMap: Map<String, String>, allowUnderscoreUsage: Boolean): Condition<Diagnostic> {
val directives = directiveMap[DIAGNOSTICS_DIRECTIVE]
val initialCondition =