Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positives on unused variable / class. #11647

kamilkloch opened this issue Jul 22, 2019 · 0 comments


Copy link

commented Jul 22, 2019

Scala 2.12.8.

  1. The following code
 def verify[T](...)(implicit eq: Equality[T]): Unit = {
    class DefaultValueUsedException extends Exception

   scala.util.Try {provider.applyOrElse(idx, throw new DefaultValueUsedException)}

produces compilation warning:

[warn] ProviderPropertyTests.scala:49:11: local class DefaultValueUsedException is never used
[warn]     class DefaultValueUsedException extends Exception
  1. Shapeless code produces unused variable compilation warning:
[warn] Unzipper.scala:60:4: parameter value gen in method shapelessSeriesUnzipper is never used
[warn]    gen: Generic.Aux[T, V], // captures V - the values of the product type T
[warn]    ^

@lrytz lrytz added the lint label Jul 22, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.