passing lazy parameter to a lazy function in D2
noob-is-noob
noob at gmail.com
Sat May 24 09:32:08 PDT 2008
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
More information about the Digitalmars-d-learn
mailing list