mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 02:43:14 +01:00
Fixed some nested function problems when accessing outer function parameters. Major changes to handling of structs. Initial support for unions. Probably more...
16 lines
172 B
D
16 lines
172 B
D
module union1;
|
|
|
|
pragma(LLVM_internal, "notypeinfo")
|
|
union U
|
|
{
|
|
float f;
|
|
int i;
|
|
}
|
|
|
|
void main()
|
|
{
|
|
float f = 2;
|
|
U u = U(f);
|
|
assert(u.i == *cast(int*)&f);
|
|
}
|