Scala Def Macros - How do I get the parameterized type member of a symbol? -
i'm trying parameterized type of member on symbol in macro context. have symbol available (can't use weaktypeof[list[blah]]) because iterating on bunch of classes.
val mewantarg = classsymbol.member("paramlist": termname).typesignature
returns...
=> list[iwantthis]
how iwantthis type object???
i've tried:
mewantarg.typesymbol.astype.typeparams //returns list(type a)
i've tried extraction:
typeref(_,_,args) = mewantarg //returns ()
keep in mind, using 2.10.2 macro plugin.
i guessing => iwantthis
paramlist
not val
arity-0 method without parentheses:
def paramlist: list[iwantthis] = ???
if so, member method type, , have return type of method before extracting arguments it:
val mewantarg = classsymbol.member("paramlist": termname).asmethod.returntype val typeref(_,_,args) = mewantarg
Comments
Post a Comment