scala / scala-abide

obsolete; visit https://github.com/scalacenter/scalafix instead

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

False positive for unused value when destructuring

leifwickland opened this issue · comments

warning: value s is not used.
  val a = Seq(Some(1)->"2").collect { case (Some(i), s) if (i > 0) => s }
                                                     ^

(Apologies if this doesn't produce a reproducible test case. I'm attempting to replicate an example from a closed code base. If you struggle to produce the reported error, I'd be happy to attempt to offer a better example.)

I've seen something similar, it's related to how pattern matching is desugared. Thanks for reporting!

Abide is superseded by https://github.com/scalacenter/scalafix; closing all issues