abstract class BaseActor[U: TaskUnit](master: ActorRef) extends Actor with ActorLogging {
def receive = {
..
..
case taskUnit: U => ...
}
def performTask(task: U): Future[_]
}
My TaskUnit looks like:
trait TaskUnit {
def status(status: String): TaskResponse[_]
}
I am getting 1 error and 1 warning which I need some advice on.
I'm getting an warning saying TaskUnit does not take type parameters (this error is on the abstract class definition line)
Warning saying the abstract type pattern U is unchecked since it is eliminated by erasure (this is for the case taskUnit: U line)
What is the problem with my current design?