vendredi 19 juin 2015

Types and Symbols in Scala reflection API

Why converting Type to Symbol and back leads to lose of type information?

Code:

println(typeOf[String] <:< typeOf[String])
println(typeOf[String].typeSymbol.info <:< typeOf[String])

Output:

true
false





Aucun commentaire:

Enregistrer un commentaire