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
64
64
val sourceRoot = ctx.settings.sourceroot.value
65
65
val appendDiagnostics = phaseMode == ExtractSemanticDB .PhaseMode .AppendDiagnostics
66
66
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)
71
68
units.map { unit =>
72
69
val unitCtx = ctx.fresh.setCompilationUnit(unit).withRootImports
73
70
val outputDir =
@@ -80,7 +77,7 @@ class ExtractSemanticDB private (phaseMode: ExtractSemanticDB.PhaseMode) extends
80
77
(outputDir, source)
81
78
}.asJava.parallelStream().forEach { case (out, source) =>
82
79
warnings.get(source).foreach { ws =>
83
- ExtractSemanticDB .appendDiagnostics(ws, out)
80
+ ExtractSemanticDB .appendDiagnostics(ws.map(_.toSemanticDiagnostic) , out)
84
81
}
85
82
}
86
83
else
You can’t perform that action at this time.
0 commit comments