I'm trying to replicate a code from https://vertx.io/docs/vertx-core/scala/#_the_event_bus_api but I got a compile error.
override def start(): Unit = {
vertx.eventBus.sendFuture("anAddress", "message 1").onComplete {
case Success(result) => {
println("The handler un-registration has reached all nodes")
}
case Failure(cause) => {
println(s"$cause")
}
}
}
I'm getting this error:
missing parameter type for expanded function
The argument types of an anonymous function must be fully known. (SLS 8.5)
Expected type was: scala.util.Try[io.vertx.scala.core.eventbus.Message[?]] => ?
vertx.eventBus.sendFuture("anAddress", "message 1").onComplete {
^
How can I solve this?
I'm using Scala 2.12.8 and Vert.x 3.7.1
I have looked around but no sucess.
Thanks to advance!