view test/structs4.d @ 307:7ade5e035beb trunk

[svn r328] Fixed an issue with interfaces where the vtable type of a interface implemented could be invalid. Fixes several tango modules like, FileStream, ServerSocket and most tina cluster modules :)
author lindquist
date Sat, 28 Jun 2008 03:45:18 +0200
parents b706170e24a9
children
line wrap: on
line source

module structs4;

struct S{
    int a;
    T t;
}

struct T{
    int b;
    U u;
}

struct U{
    int c;
}

void main()
{
    S s;
    s.a = 3;
    s.t = T.init;
    s.t.b = 4;
    s.t.u = U.init;
    s.t.u.c = 5;
    //{assert(s.t.u.c == 5);}
}