Scala:没有进行隐式转换?

时间:2018-02-26 21:02:39

标签: scala akka implicits

[error] DeviceAffiliationCluster.scala:56: value ask is not a member of akka.actor.ActorRef
[error]   def ask(msg: Any): Future[Any] = deviceRegion.ask(msg)
[error]                                                 ^
[warn] DeviceAffiliationCluster.scala:5: Unused import
[warn] import akka.pattern.ask

akka.pattern.ask提供隐式转化(从ActorRefAskableActorRef,后者提供方法ask

但是,当我使用sbt进行编译时,无法识别转换。 (Intellij看到隐式转换并且没有问题,但我使用sbt来构建。)

我可以让它明确地运作:

val deviceRegion: ActorRef =  ...

val deviceRegionAskable: AskableActorRef = deviceRegion

0 个答案:

没有答案