From 84eb74e19470ab7d130c23e580a0b79beec94353 Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Mon, 11 Jan 2021 13:28:46 +0300 Subject: [PATCH] [Test] Fix bug with FirCfgDumpHandler which didn't start at all Flag `alreadyDumped` is needed due to the fact that CFG dumper is not prepared to multimodule tests yet, so in such test this handler dumps only first module to .dot file. I forgot to switch it to `true` when it was introduced, so this checker actually, didn't handle anything at all --- .../kotlin/test/frontend/fir/handlers/FirCfgDumpHandler.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/fir/handlers/FirCfgDumpHandler.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/fir/handlers/FirCfgDumpHandler.kt index 49afd6fb3e3..164d4a1880b 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/fir/handlers/FirCfgDumpHandler.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/fir/handlers/FirCfgDumpHandler.kt @@ -25,6 +25,7 @@ class FirCfgDumpHandler(testServices: TestServices) : FirAnalysisHandler(testSer if (alreadyDumped || FirDiagnosticsDirectives.DUMP_CFG !in module.directives) return val file = info.firFiles.values.first() file.accept(FirControlFlowGraphRenderVisitor(builder)) + alreadyDumped = true } override fun processAfterAllModules(someAssertionWasFailed: Boolean) {