view tests/mini/structinit5.d @ 1185:8baf611f0009

Fix nested references to 'ref' foreach variables. These "walk around" the array being iterated over, so they're a bit trickier than other variables to get right.
author Frits van Bommel <fvbommel wxs.nl>
date Wed, 01 Apr 2009 00:01:44 +0200
parents 545f54041d91
children
line wrap: on
line source

struct Vertex {
    uint[1] c;
}

void main() {
    uint[1] c = 0xffffffff;

    auto v = Vertex(c);

    assert(v.c[0] == 0xffffffff);  // fails in LDC
}