Closed
Description
Reproduction steps
Scala 2.13.15, 2.13.16 and 2.13.17-bin-ebdaf73
build.sbt
Global / resolvers += "scala-integration" at "https://scala-ci.typesafe.com/artifactory/scala-integration/"
scalaVersion := "2.13.17-bin-ebdaf73"
scalacOptions += "-Wunused"
Main.scala
case class A(x: Int, y: Int)
object Main {
for {
a <- List.empty[A]
A(x, y) = a
} yield x + y
}
Problem
[warn] false-positive-unused-warn/Main.scala:6:7: pattern var x in value $anonfun is never used
[warn] A(x, y) = a
[warn] ^
[warn] false-positive-unused-warn/Main.scala:6:10: pattern var y in value $anonfun is never used
[warn] A(x, y) = a
[warn] ^
[warn] two warnings found
x
and y
not unused.