HairyFotr / linter

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

UnextendedSealedTrait not noticing type abbreviations #59

Open seanmcl opened 7 years ago

seanmcl commented 7 years ago
sealed trait HttpStatusCode {
  val intValue: Int
}

object HttpStatusCode {
  private type T = HttpStatusCode
  case object BadRequest extends T { val intValue = 400 }
  case object Unauthorized extends T { val intValue = 403 }
  case object InternalServerError extends T { val intValue = 500 }
}

gives

warning: [UnextendedSealedTrait] This sealed trait is never extended
sealed trait HttpStatusCode {