Valid to assign to field of struct in union?
Timon Gehr via Digitalmars-d
digitalmars-d at puremagic.com
Wed Sep 7 14:51:29 PDT 2016
On 06.09.2016 22:44, Johan Engelen wrote:
> On Tuesday, 6 September 2016 at 17:58:44 UTC, Timon Gehr wrote:
>>
>> I don't think so (although your case could be made to work easily
>> enough). This seems to be accepts-invalid.
>
> What do you think of the original example [1] in the bug report that uses
> `mixin Proxy!i;` ?
>
> [1] https://issues.dlang.org/show_bug.cgi?id=16471#c0
Would be better if it just worked, but if it doesn't, it should print a
diagnostic instead of just producing wrong code.
More information about the Digitalmars-d
mailing list