Libdparse needs to be updated to recognize AliasAssign declarations

Paul Backus snarwin at gmail.com
Tue May 4 19:21:36 UTC 2021


On Tuesday, 4 May 2021 at 19:04:59 UTC, user1234 wrote:
> On Tuesday, 4 May 2021 at 18:59:05 UTC, Paul Backus wrote:
>>
>> That would break existing code. For example:
>>
>>     void main() {
>>         int x = 123;
>>         int y = 456;
>>         alias z = x;
>>         z = y; // runtime assignment
>>         assert(x == 456);
>>     }
>
> You can make the difference tho. z is not a type or a 
> compile-time sequence.

AliasAssign is not limited to just types and compile-time 
sequences, so I don't see why that's relevant.


More information about the Digitalmars-d mailing list