view test/multiarr1.d @ 85:f869c636a113 trunk

[svn r89] Fixed a bunch of problems with template instance across multiple modules. Fixed initialization of function local static variables, with a non const initializer (now happens on first call using a global to make sure it only happens once.)
author lindquist
date Fri, 02 Nov 2007 06:32:32 +0100
parents b688ad419f8c
children 61615fa85940
line wrap: on
line source

module multiarr1;

void main()
{
    int[16][16] a;
    a[10][13] = 42;
    assert(a[0][0] == 0);
    assert(a[10][13] == 42);
    {assert(*((cast(int*)a)+10*16+13) == 42);}
}