On Wednesday, 23 October 2024 at 13:00:15 UTC, Anton Pastukhov
wrote:
On Wednesday, 23 October 2024 at 12:46:24 UTC, Paul Backus
wrote:
snip
Thanks, that's a good catch. `alias myAlias = MyStruct.test` is
really just a typo, I meant `alias myAlias = myStruct.test`,
so I actually have an instance. It's still not compiling
You can't use an `alias` to refer to a member variable like this.
When you write
alias myAlias = myStruct.test;
...it is silently rewritten by the compiler to
alias myAlias = MyStruct.test;
So, in reality, there is no difference between the two versions.