Mercurial > projects > ldc
view test/union1.d @ 73:b706170e24a9 trunk
[svn r77] Fixed foreach on slice.
Fixed some nested function problems when accessing outer function parameters.
Major changes to handling of structs.
Initial support for unions.
Probably more...
author | lindquist |
---|---|
date | Wed, 31 Oct 2007 03:11:32 +0100 |
parents | |
children |
line wrap: on
line source
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); }