[dmd-internals] Nested Unions?

David Nadlinger code at klickverbot.at
Fri Oct 12 13:16:37 PDT 2012


On Fri, Oct 12, 2012 at 6:39 PM, Andrei Alexandrescu <andrei at erdani.com> wrote:
> On 10/12/12 11:43 AM, Iain Buclaw wrote:
>> I'd say this is a accepts invalid bug - unions should be POD only in my
>> opinion.
> Agree, although by the TAWD principle things should just work.

I agree – bvut he question then is how to interpret TAWD, I guess.
Most people are probably not even aware that unions can member
methods. And by disallowing access to the outer scope, we would make
unions behave exactly the same as static nested structs, which I think
is not unreasonable.

David


More information about the dmd-internals mailing list