-
-
Save lrytz/b81535bdd4541f5856f250c317dfad14 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/compiler/scala/tools/nsc/reporters/StoreReporter.scala b/src/compiler/scala/tools/nsc/reporters/StoreReporter.scala | |
index 07d3545e3c..7a0f9d9f83 100644 | |
--- a/src/compiler/scala/tools/nsc/reporters/StoreReporter.scala | |
+++ b/src/compiler/scala/tools/nsc/reporters/StoreReporter.scala | |
@@ -31,9 +31,17 @@ class StoreReporter(val settings: Settings) extends FilteringReporter { | |
val infos = new mutable.LinkedHashSet[StoreReporter.Info] | |
+ private lazy val semanticdbReporterUnderlying: Option[FilteringReporter] = | |
+ Option.when(getClass.getSimpleName == "SemanticdbReporter") { | |
+ val f = getClass.getDeclaredField("underlying") | |
+ f.setAccessible(true) | |
+ f.get(this).asInstanceOf[FilteringReporter] | |
+ } | |
+ | |
override def doReport(pos: Position, msg: String, severity: Severity, actions: List[CodeAction]): Unit = { | |
val info = StoreReporter.Info(pos, msg, severity, actions) | |
infos += info | |
+ semanticdbReporterUnderlying.foreach(_.doReport(pos, msg, severity, actions)) | |
} | |
override def reset(): Unit = { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment