digitalmars.D.bugs - [Issue 1740] New: Full closure problem
- d-bugmail puremagic.com (31/31) Dec 17 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1740
- d-bugmail puremagic.com (9/9) Jan 02 2008 http://d.puremagic.com/issues/show_bug.cgi?id=1740
http://d.puremagic.com/issues/show_bug.cgi?id=1740 Summary: Full closure problem Product: D Version: 2.008 Platform: PC OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: davidl 126.com import std.stdio; void func(string delegate() dg) { dg(); } void main() { string[] k=["adf","AsdfadSF","dfdsfassdf"]; foreach(d;k) { writefln(d); func(delegate string() {assert(d!="");return d;}); } } runtime result: Error: AssertError Failure abc(13) This make delegate in this case useless. --
Dec 17 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1740 bugzilla digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED Fixed dmd 2.009 --
Jan 02 2008