UDA and static struct fields

Andrea Fontana nospam at example.com
Thu May 24 10:23:41 UTC 2018


On Thursday, 24 May 2018 at 09:17:10 UTC, Alex wrote:
> On Thursday, 24 May 2018 at 08:48:30 UTC, Andrea Fontana wrote:
>>>
>>> This line:
>>>
>>>       mixin("alias tmp = " ~ s ~ ";");
>>>
>>> There's no mention of Symbol in there. If you change it to 
>>> this:
>>>
>>>       mixin("alias tmp = Symbol" ~ s ~ ";");
>>>
>>> then suddenly things work.
>>>
>>> --
>>>   Simen
>>
>> What?
>
> a dot is missing, but essentially, Simen found it :)
>
> Line 20 in https://run.dlang.io/is/OGHJYX should be:
>
> mixin("alias tmp = Symbol." ~ s ~ ";");

Whoops I didn't get it.
Thank you both.

Andrea


More information about the Digitalmars-d-learn mailing list