http://d.puremagic.com/issues/show_bug.cgi?id=7428
Walter Bright <bugzi...@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzi...@digitalmars.com --- Comment #1 from Walter Bright <bugzi...@digitalmars.com> 2012-02-04 18:41:52 PST --- I simplified this a bit (still hurts my brain, though). The bug is tripped when a lambda is used rather than the equivalent nested function: alias long delegate(long) dg_t; void Y(dg_t delegate (dg_t) y) { struct F { long delegate(F) f; }; version (all) { // generates error (dg_t delegate(F) a){return a(F((F b){return y(a(b))(1);})); } ((F b){return (long n){return b.f(b);};}); } else { auto abc(dg_t delegate(F) a) { return a(F((F b){return y(a(b))(1);})); } abc((F b){return (long n){return b.f(b);};}); } } void main(){ auto foo(dg_t self) { auto bar(long i) { return self(1); } return &bar; } Y(&foo); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------