Skip to content

Commit ddd9340

Browse files
committed
Decrease DelegatingReporter suppression zone
1 parent 362343d commit ddd9340

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

compiler/src/dotty/tools/dotc/reporting/UniqueMessagePositions.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import core.Contexts._
1010
* are suppressed, unless they are of increasing severity. */
1111
trait UniqueMessagePositions extends Reporter {
1212

13-
private val positions = new mutable.HashMap[(SourceFile, Int), Diagnostic]
13+
private val positions = new mutable.HashMap[(SourceFile, Integer), Diagnostic]
1414

1515
/** Logs a position and returns true if it was already logged.
1616
* @note Two positions are considered identical for logging if they have the same point.

sbt-bridge/src/dotty/tools/xsbt/DelegatingReporter.java

+11-4
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
*/
44
package dotty.tools.xsbt;
55

6+
import scala.Tuple2;
7+
import scala.collection.mutable.HashMap;
8+
69
import dotty.tools.dotc.core.Contexts.Context;
710
import dotty.tools.dotc.reporting.AbstractReporter;
811
import dotty.tools.dotc.reporting.Diagnostic;
912
import dotty.tools.dotc.reporting.Message;
13+
import dotty.tools.dotc.util.SourceFile;
1014
import dotty.tools.dotc.util.SourcePosition;
1115
import xsbti.Position;
1216
import xsbti.Severity;
1317

14-
// sbt-bridge/src/dotty/tools/xsbt/DelegatingReporter.java:14:1: dotty$tools$dotc$reporting$UniqueMessagePositions$$positions() in dotty.tools.dotc.reporting.AbstractReporter implements dotty$tools$dotc$reporting$UniqueMessagePositions$$positions() in dotty.tools.dotc.reporting.UniqueMessagePositions
15-
// return type requires unchecked conversion from scala.collection.mutable.HashMap to scala.collection.mutable.HashMap<scala.Tuple2<dotty.tools.dotc.util.SourceFile,java.lang.Object>,dotty.tools.dotc.reporting.Diagnostic>
16-
@SuppressWarnings("unchecked")
17-
1818
final public class DelegatingReporter extends AbstractReporter {
1919
private xsbti.Reporter delegate;
2020

@@ -66,4 +66,11 @@ private static Position positionOf(SourcePosition pos) {
6666
return PositionBridge.noPosition;
6767
}
6868
}
69+
70+
@SuppressWarnings("unchecked")
71+
// [warn] sbt-bridge/src/dotty/tools/xsbt/DelegatingReporter.java:18:1: dotty$tools$dotc$reporting$UniqueMessagePositions$$positions() in dotty.tools.dotc.reporting.AbstractReporter implements dotty$tools$dotc$reporting$UniqueMessagePositions$$positions() in dotty.tools.dotc.reporting.UniqueMessagePositions
72+
// [warn] return type requires unchecked conversion from scala.collection.mutable.HashMap to scala.collection.mutable.HashMap<scala.Tuple2<dotty.tools.dotc.util.SourceFile,java.lang.Integer>,dotty.tools.dotc.reporting.Diagnostic>
73+
public HashMap<Tuple2<SourceFile, Integer>, Diagnostic> dotty$tools$dotc$reporting$UniqueMessagePositions$$positions() {
74+
return (HashMap<Tuple2<SourceFile, Integer>, Diagnostic>) super.dotty$tools$dotc$reporting$UniqueMessagePositions$$positions();
75+
}
6976
}

0 commit comments

Comments
 (0)