Extracting Type Parameters from Expressions #13072
Unanswered
Zeimyth
asked this question in
Metaprogramming
Replies: 1 comment 5 replies
-
Could you provide a small self-contained example? By |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am attempting to process a varargs of expressions in a macro. The expressions all follow a very similar pattern--calling a function with a type parameter--and largely only differ meaningfully in the exact type parameter that they use. I want to process each expression individually in my macro, and I need to extract the type parameter in order to do this in a useful manner.
Given an expression such that
expr.show
results in:how do I extract
StaticallyKnownType
? Ideally, I would like to end up with aType[StaticallyKnownType]
.Beta Was this translation helpful? Give feedback.
All reactions