diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/DiagnosticsService.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/DiagnosticsService.kt index 981653b7ac5..c0867af432e 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/DiagnosticsService.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/DiagnosticsService.kt @@ -11,9 +11,6 @@ import org.jetbrains.kotlin.test.util.* class DiagnosticsService(val testServices: TestServices) : TestService { private val conditionsPerModule: MutableMap> = mutableMapOf() - private val globalDefinedDiagnostics by lazy { - testServices.moduleStructure.allDirectives[DiagnosticsDirectives.DIAGNOSTICS] - } fun shouldRenderDiagnostic(module: TestModule, name: String): Boolean { val condition = conditionsPerModule.getOrPut(module) { @@ -23,7 +20,7 @@ class DiagnosticsService(val testServices: TestServices) : TestService { } private fun computeDiagnosticConditionForModule(module: TestModule): Condition { - val diagnosticsInDirective = module.directives[DiagnosticsDirectives.DIAGNOSTICS] + globalDefinedDiagnostics + val diagnosticsInDirective = module.directives[DiagnosticsDirectives.DIAGNOSTICS] val enabledNames = mutableSetOf() val disabledNames = mutableSetOf() for (diagnosticInDirective in diagnosticsInDirective) {