view test/union3.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
line wrap: on
line source

module union3;

pragma(LLVM_internal, "notypeinfo")
union vec3
    struct { float x,y,z; }
    float[3] xyz;

void main()
    vec3 v;
    assert(&v.y is &[1]);