there is a case class:
case class A()
And there is a Type variable:
val typeA = typeOf[A]
I want to create object val l = List[A](), but I only have typeA now and create object by val l = List[/*convert typeA*/](), how to do?
val l = List[A]()
typeA
val l = List[/*convert typeA*/]()
Aucun commentaire:
Enregistrer un commentaire