view test/bug13.d @ 122:36ab367572df trunk

[svn r126] String switch is now implemented. A few other fixes.
author lindquist
date Tue, 27 Nov 2007 09:19:07 +0100
parents 8b0e809563df
children
line wrap: on
line source

module bug13;

void func1(ubyte[4]* arr)
{
    ubyte* b = &(*arr)[0];
    func2(&(*arr)[1]);
}

void func2(ubyte* ptr)
{
    assert(*ptr == 2);
}

void main()
{
    ubyte[4] arr = [cast(ubyte)1,2,3,4];
    func1(&arr);
}