title: How to get ClassTag for specialized types?
body: <pre><code>scala&gt; val i = (0, 0)
  i: (Int, Int) = (0,0)
  
  scala&gt; i.getClass
  res0: Class[_ &lt;: (Int, Int)] = class scala.Tuple2$mcII$sp
  
  scala&gt; def f[T: reflect.ClassTag](t: T) = implicitly[reflect.ClassTag[T]]
  f: [T](t: T)(implicit evidence$1: scala.reflect.ClassTag[T])scala.reflect.ClassTag[T]    
  
  scala&gt; f(i)
  res1: scala.reflect.ClassTag[(Int, Int)] = scala.Tuple2
  </code></pre>
  
  <p>The implicit <code>ClassTag</code> argument is wrong. <code>scala.Tuple2</code> is not the class of <code>i</code>. The correct <code>ClassTag</code> would be for <code>scala.Tuple2$mcII$sp</code>.</p>
  
  <p>This behavior is a problem for us, as we use <a href="https://github.com/EsotericSoftware/kryo" rel="nofollow">Kryo</a> for serialization. You give a <code>Class</code> argument to <code>readObject</code>. As we take it from the <code>ClassTag</code>, we give it the wrong class for specialized classes. We then read garbage.</p>
  
  <p>Am I using <code>ClassTag</code> wrong? Or is this a bug in Scala 2.11.0?</p>