As discussed in http://groups.google.com/group/scala-internals/browse_thread/thread/90927a689028dfe4
import scala.reflect.{ClassTag, classTag}
import scala.reflect.runtime.universe.{TypeTag, typeTag}
class C
object Test extends App {
implicit val cctag: ClassTag[C] = ClassTag[C](classOf[C])
def foo[T: ClassTag](xs: T*) = println(classTag[T])
foo(1, 2)
foo()
implicit val cttag: TypeTag[C] = { val cttag = "shadow cttag"; typeTag[C] }
def bar[T: TypeTag](xs: T*) = println(typeTag[T])
bar(1, 2)
bar()
}
10:15 ~/Projects/Kepler_5923/sandbox (ticket/5923)$ sr
Int
C
TypeTag[Int]
TypeTag[C]
Whereas one would expect the second and the fourth line to print Nothing and TypeTag[Nothing].