[Issue 8832] Segfault when accessing range returned by function that has delegate referencing local variables

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Oct 18 08:44:30 PDT 2012


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



--- Comment #2 from hsteoh at quickfur.ath.cx 2012-10-18 08:44:25 PDT ---
I think I may have figured out the cause of this bug. If boo() is modified as
follows:

auto boo() {
    auto C = [2];
    auto d = delegate(int) => C;
    return [1,1].map!d.joiner;
}

then everything works. Seems to me that the compiler is failing to pick up the
reference to C *when the delegate is defined inside the compile-time parameter*
to map. Hopefully this helps narrow it down enough to find the problem in the
dmd code.

-- 
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