The macros I’ve been writing typically need to process all the defs from other objects/modules that live in libraries etc so the trees are not available. Inside the macro, I often need to transform a MethodSymbol obtained from the other object, into a new API call in my target trait that replicates the function signature including default parameters.
However, I’ve not figured out a way to obtain default parameter values for the parameters in the MethodSymbol so when I build up the result, I cannot “replicate” some of the method signature as I would like.
Is there a way to obtain the default parameters, say for parameters obtained from the “members” property of the symbol’s “type”, for the parameters in the MethodSymbol?