I want to get actual type class from Generic type.
When I try this
I get class scala.runtime.Nothing
only.
import scala.reflect._
class Car {
}
object Car extends Model[Car] {
}
trait Model[T] {
def something[T:ClassTag]():Unit = {
println(classTag[T].runtimeClass)
}
}
Car.something() // <- scala.runtime.Nothing$