May 24, 2008 passing lazy parameter to a lazy function in D2 | ||||
---|---|---|---|---|
| ||||
It should be a bug bugzilla not addressed yet, pls enter it ? Thanks. ===code=== import std.stdio ; class C { string find(lazy bool cond) { return solve(cond) ; } string solve(lazy bool cond) { return cond ? "found" : "not found" ; } } void main() { C c = new C ; writefln(c.solve(true)) ; writefln(c.find(true)) ; } ===output=== v1.030: found found v2.014: found Error: Access Violation |
Copyright © 1999-2021 by the D Language Foundation