在斯卡拉2.9.1,我可以做爲什麼不一些(List(1,2,3))。flatten compile?
> Some(List(1,2,3)).flatten
List(1,2,3)
但在斯卡拉2.10.0,
> Some(List(1,2,3)).flatten
Cannot prove that Seq[Int] <:< Option[B]
我發現this封閉的錯誤,但我不明白的判決,或者爲什麼關門了。
(1)爲什麼不這項工作在斯卡拉2.10(明顯是設計?)
(2)什麼是地道的2.10當量的我2.9的代碼?
http://stackoverflow.com/questions/8313802/difference-in-flattening-an-optionlistint-in-2-9-1-and-2-每晚10?rq = 1是非常相關的。 –