-
Notifications
You must be signed in to change notification settings - Fork 22
Closed
scala/scala
#11012Labels
fixed in Scala 3This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)has PR
Milestone
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.
Metadata
Metadata
Assignees
Labels
fixed in Scala 3This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)has PR