Call new on class with type parameters #15187
Answered
by
gregghz
gregghz
asked this question in
Metaprogramming
-
|
Given this class: I want to write a macro such that when it's called like this: It produces the equivalent of this: This is my attempt: The but the compiler throws the following error: I did double check and without type params it does work fine (assuming the class is modified to have no type params): How can I successfully call the constructor while passing in type parameters? |
Beta Was this translation helpful? Give feedback.
Answered by
gregghz
May 26, 2022
Replies: 1 comment
-
This produces a valid new call to whatever class |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
gregghz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This produces a valid new call to whatever class
clsreferences with the given type and value parameters.