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 {
gives