← Back to index
|
Original Bugzilla link
Bug 1740 – Full closure problem
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2007-12-17T22:30:00Z
Last change time
2015-06-09T01:14:23Z
Keywords
wrong-code
Assigned to
bugzilla
Creator
davidl
Comments
Comment #0
by davidl — 2007-12-17T22:30:49Z
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.
Comment #1
by bugzilla — 2008-01-02T19:52:27Z
Fixed dmd 2.009