scala-logging icon indicating copy to clipboard operation
scala-logging copied to clipboard

-Ywarn-unused yields "never used" error in LoggerMacro

Open etspaceman opened this issue 5 years ago • 1 comments

If you enable the Ywarn-unused flag in this repository, there are a few errors that result. Most of them are trivial and easy to clean up (I have opened https://github.com/lightbend/scala-logging/pull/204 with some work here), but there is one in particular that I could not resolve:

[warn] /Users/emeisel/Documents/GitHub/scala-logging/src/main/scala/com/typesafe/scalalogging/LoggerMacro.scala:295:12: pattern var qq$macro$2 in method unapply is never used; `qq$macro$2@_' suppresses this warning
[warn]       case q"scala.StringContext.apply(..$parts).s(..$args)" =>
[warn]            ^
[warn] one warning found

I'm not really sure why the warning is appearing, but I wanted to raise it here for investigation.

etspaceman avatar Jan 30 '20 01:01 etspaceman

I have same issue in entirely different code base (Apache Daffodil).

mbeckerle avatar Apr 20 '21 21:04 mbeckerle