Using getSymbolsByUDA in a static foreach loop

Jack Stouffer jack at jackstouffer.com
Wed Jan 19 21:44:57 UTC 2022


On Wednesday, 19 January 2022 at 20:53:29 UTC, Adam D Ruppe wrote:
> So you want to `__traits(child, system, this).run()` and it 
> should work - the traits child will re-attach a this value.

The error is actually coming from trying to use the result of 
getSymbolsByUDA in the right part of the `static foreach`, not 
the call to the `run` function. Which was odd to me because I 
thought it just returned a `AliasSeq`.

Here's a link to the erroring code with your traits change:

https://run.dlang.io/is/gO84ox


More information about the Digitalmars-d-learn mailing list