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 @@ -467,6 +467,7 @@ object CheckUnused:
467
467
if ctx.settings.WunusedHas .explicits then
468
468
explicitParamInScope
469
469
.filterNot(d => d.symbol.usedDefContains)
470
+ .filterNot(d => usedInPosition.exists { case (pos, name) => d.span.contains(pos.span) && name == d.symbol.name})
470
471
.map(d => d.namePos -> WarnTypes .ExplicitParams ).toList
471
472
else
472
473
Nil
Original file line number Diff line number Diff line change @@ -245,3 +245,13 @@ package foo.test.i16679b:
245
245
import Foo .x
246
246
case class CoolClass (i : Int )
247
247
println(summon[myPackage.CaseClassName [CoolClass ]])
248
+
249
+ package foo .test .i17175:
250
+ val continue = true
251
+ def foo =
252
+ for {
253
+ i <- 1 .until(10 ) // OK
254
+ if continue
255
+ } {
256
+ println(i)
257
+ }
You can’t perform that action at this time.
0 commit comments