[Issue 3835] ref foreach does not work in CTFE

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Apr 10 16:27:45 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=3835



--- Comment #10 from bearophile_hugs at eml.cc 2010-04-10 16:27:42 PDT ---
A reduced test case:

int foo() {
    int[1] arr;
    foreach (ref el; arr)
        el = 10;
    return arr[0];
}
enum int r = foo();
void main() {
    assert(r == 10);
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list