HairyFotr / linter

Static Analysis Compiler Plugin for Scala
Apache License 2.0
268 stars 34 forks source link

Unused method parameter false positive on usage of types defined in parameter #43

Open HairyFotr opened 8 years ago

HairyFotr commented 8 years ago

Reported by @harshad-deo on gitter: Unused method parameter check does not consider usage of types defined in the parameter

specifically, this throws a warning:

def buildT = new Witness[EmptyDenseSet#Include[f.ValueHash]]
def build[T](f: LiteralHash[T]) = new Witness[EmptyDenseSet#Include[f.ValueHash]]
pjrt commented 7 years ago

Here's another case:

    def optClass(
        optFactory: OptFactory
      )(implicit tag: ClassTag[optFactory.SomeType]
      ): Class[_] = tag.runtimeClass