HairyFotr / linter

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

UnextendedSealedTrait raised when full name of base class is used #62

Open thesamet opened 6 years ago

thesamet commented 6 years ago

Linting the following code:

package pkg

sealed trait Base

case object Sub extends pkg.Base

would incorrectly yield:

[warn] /tmp/linter/src/main/scala/Test.scala:3: [UnextendedSealedTrait] This sealed trait is never extended
[warn] sealed trait Base
[warn]              ^
[warn] one warning found

Changing extends pkg.Base to extends Base would fix the lint error. Using the full name is sometimes necessary to prevent ambiguity.