为什么编译器在使用scala 2.10.1时无法找到隐含值TypeClass[Boolean]
? Scala 2.9.3对此没有任何问题!
package object mypackage extends Feature
package mypackage {
trait Feature {
trait TypeClass[T]
implicit object TCB extends TypeClass[Boolean] {}
}
object Main extends App {
val itcb = implicitly[TypeClass[Boolean]] // could not find implicit value for parameter e: mypackage.TypeClass[Boolean]
}
}