Hej !
I get Expected expression
when trying to do something like in the title.
I want to pass a type like that to a macro function, hoc can I do please ?
Hej !
I get Expected expression
when trying to do something like in the title.
I want to pass a type like that to a macro function, hoc can I do please ?
Hey, there’s no straightforward syntax to pass a ComplexType
as an expression. There is/was a proposal to add EComplexType
, but it doesn’t seem like it’s going to happen. The next best thing is to pass any other expression that has ComplexType
as its part, for example:
Macro.test((_:Array<String>))
- ECheckType
variantMacro.test(var _:Array<String>)
- EVars
variantHej Dan !
Thanks for your reply !
Ok I see, yes it’s a workaround. I wanted to shorten as possible a thing that why I needed that, it will be a bit more verbose, ok.
Thanks !
© 2018-2020 Haxe Foundation - Powered by Discourse