mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-21 07:13:13 +01:00
Fixed some nested function problems when accessing outer function parameters. Major changes to handling of structs. Initial support for unions. Probably more...
18 lines
192 B
D
18 lines
192 B
D
module union2;
|
|
|
|
pragma(LLVM_internal, "notypeinfo")
|
|
union U
|
|
{
|
|
float f;
|
|
long l;
|
|
}
|
|
|
|
U u;
|
|
|
|
void main()
|
|
{
|
|
assert(u.f !<>= 0);
|
|
uint* p = 1 + cast(uint*)&u.l;
|
|
assert(*p == 0);
|
|
}
|