Scala 2.10 TypeTag usage
问题 I'm digging new scala reflection api and can't figure out why the following snippet doesn't work as expected. Given hierarchy (tried to simplify as much as I can): import scala.reflect.runtime.universe._ trait TF[A] { implicit def t: TypeTag[A] def f[T <: A: TypeTag]: PartialFunction[Any, A] = { case msg: T if typeOf[T] =:= typeOf[A] => msg } } class TFilter[T: TypeTag] extends TF[T] { def t = typeTag[T] } case class Foo(x: Int) I expect method f to filter objects of given type. So the