File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
compiler/src/dotty/tools/dotc/transform
tests/neg-custom-args/fatal-warnings Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -473,6 +473,7 @@ object CheckUnused:
473
473
if ctx.settings.WunusedHas .explicits then
474
474
explicitParamInScope
475
475
.filterNot(d => d.symbol.usedDefContains)
476
+ .filterNot(d => usedInPosition.exists { case (pos, name) => d.span.contains(pos.span) && name == d.symbol.name})
476
477
.filterNot(d => containsSyntheticSuffix(d.symbol))
477
478
.map(d => d.namePos -> WarnTypes .ExplicitParams ).toList
478
479
else
Original file line number Diff line number Diff line change @@ -287,3 +287,13 @@ package foo.test.i17156:
287
287
package c:
288
288
import b .Xd
289
289
trait Z derives Xd
290
+
291
+ package foo .test .i17175:
292
+ val continue = true
293
+ def foo =
294
+ for {
295
+ i <- 1 .until(10 ) // OK
296
+ if continue
297
+ } {
298
+ println(i)
299
+ }
You can’t perform that action at this time.
0 commit comments