i have a simple PartialFunction
type ChildMatch = PartialFunction[Option[ActorRef], Unit]
def idMatch(msg: AnyRef, fail: AnyRef)(implicit ctx: ActorContext): ChildMatch = {
case Some(ref) => ref forward msg
case _ => ctx.sender() ! fail
}
but when i tried to use this - compiler wants a declaration like this:
...
implicit val ctx: ActorContext
val id: String = msg.id
idMatch(msg, fail)(ctx)(ctx.child(id))
as you can see it wants ctx as second parameter not implicitly
how i can change my idMatch function to use it like this:
...
implicit val ctx: ActorContext
val id: String = msg.id
idMatch(msg, fail)(ctx.child(id))
?