On Wednesday, 19 January 2022 at 20:46:17 UTC, Jack Stouffer wrote:
static foreach(system; getSymbolsByUDA!(Manager, Runnable))
        {
            system.run();
onlineapp.d(16): Error: value of `this` is not known at compile time

The getSymbols returns aliases, meaning you hit what I wrote about a few days ago:

http://dpldocs.info/this-week-in-d/Blog.Posted_2022_01_10.html#tip-of-the-week

The `this` is a runtime value and all the other `static` things work on compile time info.

So you want to `__traits(child, system, this).run()` and it should work - the traits child will re-attach a this value.

Reply via email to