-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
struct B
{
union
{
int a;
char c;
};
};
Produces:
extern (C)
{
struct B
{
static union _Anonymous_0
{
int a;
char c;
}
_Anonymous_0 _anonymous_1;
ref auto a() @property @nogc pure nothrow
{
return _anonymous_1.a;
}
void a(_T_)(auto ref _T_ val) @property @nogc pure nothrow
{
_anonymous_1.a = val;
}
ref auto c() @property @nogc pure nothrow
{
return _anonymous_1.c;
}
void c(_T_)(auto ref _T_ val) @property @nogc pure nothrow
{
_anonymous_1.c = val;
}
}
}
I do not see any reasons for those properties. Anonymous unions are allowed in D.