digitalmars.D.learn - passing lazy parameter to a lazy function in D2
- noob-is-noob (19/19) May 24 2008 It should be a bug bugzilla not addressed yet, pls enter it ? Thanks.
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
May 24 2008