문제

In a macro impl[A: c.WeakTypeTag], if I find that c.weakTypeOf[A] <:< typeOf[Option[Any]], how do I get the type parameter of the Option? E.g., when A is Option[String], I need to find String.

도움이 되었습니까?

해결책

Same problem as here:

c.asInstanceOf[TypeRefApi].args.head
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top