I have a method:
import scala.reflect.runtime.universe.{TypeTag,typeOf}
def print[T:TypeTag] = println(typeOf[T].typeSymbol.name.toString)
Most of the time, print[MyClass]
prints MyClass
when invoked, but sometimes, it prints <refinement>
?
I am working on a fairly complex system (multiple interconnecting jars, 100K lines of code), and I cannot seem to identify what determines if it is the one behaviour or the other. But if I knew what <refinement>
means, or what triggers that, maybe I could?
Aucun commentaire:
Enregistrer un commentaire