-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I'm not sure what this is for yet, but Evan said it would be helpful :D
import scala.language.experimental.macros
import scala.reflect.runtime.universe._
object Hi {
def interrogated(strArg: Array[String], intArg: Int, str2: String) : Int = 4
def paramInfo[T](x: T)(implicit tag: TypeTag[T]): Unit = {
val targs = tag.tpe match { case TypeRef(_, _, args) => args }
println(s"type of $x has type arguments $targs")
}
def main(args: Array[String]) = paramInfo(interrogated _)
}Metadata
Metadata
Assignees
Labels
No labels