TypeClass[Boolean]
为什么编译器在使用 scala 2.10.1 时无法找到隐式值?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]
}
}