This needs to be fixed
user1234
user1234 at 12.de
Sun Aug 25 19:35:19 UTC 2024
On Sunday, 25 August 2024 at 17:27:33 UTC, Manu wrote:
> Oh nice catch...
> But that just leads to the question; what's with `b` then?
> Why did `b` emit the error eagerly at the assignment, but `d`
> decided to
> take a lazy approach as you say?
>
> What I really want to know though; why do these aliases drop
> the instance?
> That's just a bug right?
> There's no reason you would want that behaviour, and it's
> obvious that an
> alias+instance reference *can* be carried by the AST, because
> it's there
> before it's unceremoniously dropped basically whenever you
> touch it.
Just in case, the kind of alias you are debating about is to be
deprecated, see
https://dlang.org/spec/legacy.html#alias-instance-member.
It seems that what you are looking for is more a kind of system
of parameter-less expression-macros. I have put a link to an old
PR in a previous answer. You'll see that the main issue is that
such aliases needs to be recontextualized for each new use.
More information about the Digitalmars-d
mailing list