File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
compiler/src/dotty/tools/dotc/semanticdb Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -64,10 +64,7 @@ class ExtractSemanticDB private (phaseMode: ExtractSemanticDB.PhaseMode) extends
6464 val sourceRoot = ctx.settings.sourceroot.value
6565 val appendDiagnostics = phaseMode == ExtractSemanticDB .PhaseMode .AppendDiagnostics
6666 if (appendDiagnostics)
67- val warnings = ctx.reporter.allWarnings
68- .groupBy(w => w.pos.source)
69- .map((k, ws) => (k, ws.map(_.toSemanticDiagnostic)))
70- .toMap
67+ val warnings = ctx.reporter.allWarnings.groupBy(w => w.pos.source)
7168 units.map { unit =>
7269 val unitCtx = ctx.fresh.setCompilationUnit(unit).withRootImports
7370 val outputDir =
@@ -80,7 +77,7 @@ class ExtractSemanticDB private (phaseMode: ExtractSemanticDB.PhaseMode) extends
8077 (outputDir, source)
8178 }.asJava.parallelStream().forEach { case (out, source) =>
8279 warnings.get(source).foreach { ws =>
83- ExtractSemanticDB .appendDiagnostics(ws, out)
80+ ExtractSemanticDB .appendDiagnostics(ws.map(_.toSemanticDiagnostic) , out)
8481 }
8582 }
8683 else
You can’t perform that action at this time.
0 commit comments