File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
compiler/src/dotty/tools/dotc/reporting Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -190,15 +190,16 @@ abstract class Reporter extends interfaces.ReporterResult {
190
190
191
191
def reportNewFeatureUseSite (featureTrait : Symbol ): Unit = reportedFeaturesUseSites += featureTrait
192
192
193
- val unreportedWarnings : mutable.HashMap [String , Int ] = new mutable.HashMap [String , Int ] {
194
- override def default (key : String ) = 0
195
- }
193
+ var unreportedWarnings : Map [String , Int ] = Map .empty
196
194
197
195
def report (m : MessageContainer )(implicit ctx : Context ): Unit =
198
196
if (! isHidden(m)) {
199
197
doReport(m)(ctx.addMode(Mode .Printing ))
200
198
m match {
201
- case m : ConditionalWarning if ! m.enablingOption.value => unreportedWarnings(m.enablingOption.name) += 1
199
+ case m : ConditionalWarning if ! m.enablingOption.value =>
200
+ val key = m.enablingOption.name
201
+ unreportedWarnings =
202
+ unreportedWarnings.updated(key, unreportedWarnings.getOrElse(key, 0 ) + 1 )
202
203
case m : Warning => _warningCount += 1
203
204
case m : Error =>
204
205
errors = m :: errors
You can’t perform that action at this time.
0 commit comments