我正在尝试使用 Miles Sabins 对如何将丰富我的库模式应用于 Scala 集合的回答来拉皮条 TraversableLike?但是编译器无法识别 FromRepr、HasElem 或implicitConversions
package packMain
import scala.collection.generic.{ CanBuildFrom, FromRepr, HasElem }
import language.implicitConversions
class ImplClasses {}
FromRepr is not a member of scala.collection.generic
HasElem is not a member of scala.collection.generic
not found object language
我尝试将 Eclipse Indigo 与 Scala 插件 2.02 和 2.9.2 Final 以及 Eclipse 4.2 Juno 与 Scala 插件 2.1M2 和 2.10.0M7 一起使用编辑:
import language.implicitConversions._ //works in 2.10M7 as gilad hock's comment
import scala.collection.generic.FromRepr._ //object FromRep is not a member of ...
import scala.collection.generic.HasElem._ //object HasElem is not a member of ...