view test/union2.d @ 177:cea8dcfa76df trunk

[svn r193] Fixed: abstract classes implementing interfaces now output proper Interface info arrays. (null vtables). Did a little renaming of delegate utils.
author lindquist
date Wed, 07 May 2008 04:45:51 +0200
parents 61615fa85940
children
line wrap: on
line source

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;
        {assert(*p == 0);}
    }
}