Skip to content

Commit 34aaf0d

Browse files
retronymadriaanm
authored andcommitted
SI-5675 Discard duplicate feature warnings at a position
When -feature has not been enabled, we were double counting identical feature warnings that were emitted at the same position. Normal error reporting only reports the first time a warning appears at a position; feature warning counter incrementing should behave the same way. @hubertp: Fixed .check files that were broken in the original commit.
1 parent 97eb6b6 commit 34aaf0d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/files/jvm/interpreter.check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ scala> case class Bar(n: Int)
9797
defined class Bar
9898

9999
scala> implicit def foo2bar(foo: Foo) = Bar(foo.n)
100-
warning: there were 1 feature warnings; re-run with -feature for details
100+
warning: there were 1 feature warning(s); re-run with -feature for details
101101
foo2bar: (foo: Foo)Bar
102102

103103
scala> val bar: Bar = Foo(3)
@@ -271,7 +271,7 @@ scala> xs map (x => x)
271271
res6: Array[_] = Array(1, 2)
272272

273273
scala> xs map (x => (x, x))
274-
warning: there were 1 feature warnings; re-run with -feature for details
274+
warning: there were 1 feature warning(s); re-run with -feature for details
275275
res7: Array[(_$1, _$1)] forSome { type _$1 } = Array((1,1), (2,2))
276276

277277
scala>

0 commit comments

Comments
 (0)