Skip to content

Instantly share code, notes, and snippets.

@aalexandrov
Created October 14, 2014 14:22
Show Gist options
  • Save aalexandrov/11dad8f600c866366183 to your computer and use it in GitHub Desktop.
Save aalexandrov/11dad8f600c866366183 to your computer and use it in GitHub Desktop.
case class SomeType[+T: TypeTag](val int: Int) {
def paramInfo[U >: T](x: U): Unit = {
val targs = typeOf[T] match { case TypeRef(_, _, args) => args }
println(s"Type of $x has type arguments $targs")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment