Open Temtaime opened 2 years ago
I just copied the definition into a D file and it compiled fine. I don't remember/know why it was done this way, but given the way I work (TDD) I doubt it was for no reason but who knows. Maybe there was a reason and there isn't anymore.
In any case, the translations aren't really meant to be read - and while this is apparently unneeded, it also doesn't cause any problems. If you feel like tackling it, then PRs welcome.
There are problems.
B b;
int* a = &b.a;
Error: cannot implicitly convert expression &b.a
of type extern (C) int delegate() pure nothrow @nogc @property ref @safe
to int*
There are problems.
I would have led with that instead of "ugly code" ;)
Adding a test now.
Produces:
I do not see any reasons for those properties. Anonymous unions are allowed in D.