view tests/mini/foreach6.d @ 1223:5f340a6dc749

Fix nested functions. My last patch was a little over-zealous in passing `undef`, it always passed `undef` to inner functions expecting a single context frame.
author Frits van Bommel <fvbommel wxs.nl>
date Fri, 17 Apr 2009 13:50:01 +0200
parents 30b42a283c8e
children
line wrap: on
line source

module mini.foreach6;

struct S
{
    long l;
    float f;
}

void main()
{
    S[4] arr = void;
    foreach(i,v;arr) {
        v = S(i, i*2.5);
    }
}