我试图从功能未来在以下方法返回一个元组返回元组的未来:Scala中不工作
def f:Future[(List[Int],List[String])] = Future{
(List(1,2,3),List("Hello","World"))
}
这我是从主调用如下:
var (a,c) = f
这是给我下面的错误
Error: constructor cannot be instantiated to expected type;
found : (T1, T2)
required: scala.concurrent.Future[(List[Int], List[String])]
是的,我知道了......非常感谢 –