Finding type parameters via reflection in Scala 2.10?

Starting with Scala 2.11, you can simply use:

yourGenericType.typeArgs.head

See the macros changelog point number 14.

Leave a Comment