Closed tgodzik closed 1 year ago
@som-snytt wdyt, is this a new bug? another dilemma like #10287?
It desugars to foo.withFilter(pkg => ...).map(pkg => ...)
and the first pkg
is used but the second pkg
is not, hence the warning.
@tgodzik wait, 2.13.10 is the same
~/tmp/si-12801 % scala-cli compile . main
Compiling project (Scala 2.13.10, JVM)
[warn] ./S.scala:7:7
[warn] parameter value pkg in anonymous function is never used
[warn] pkg <- Array(1).iterator
[warn] ^^^
jinx.
Edit: note param warnings are not enabled under -Xlint
, which offers only the most robust warnings.
Closing as duplicate. I did hope to tackle the linked issue at some point, for dotty parity.
Tomasz will make a fresh attempt to determine why he started seeing warnings after a 2.13.11 upgrade that weren't there before.
I have no idea why it started showing on 2.13.11 :/ I will add nowarn everywhere now :sigh:
@tgodzik scalac -nowarn
Reproduction steps
2.13.11
Problem
pkg is reported as unused