[Issue 3125] statement foreach semantic opApply should be tried if range funcs not satisfied
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jul 2 19:52:45 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3125
--- Comment #4 from david <davidl at 126.com> 2009-07-02 19:52:44 PDT ---
Here it is:
class c
{
int head()
{
return 0;
}
int opApply(int delegate(ref int x) dg)
{
int i;
i=3;
dg(i);
return 1;
}
}
void main()
{
c c;
c= new c;
foreach(m;c)
{
assert(m==3);
}
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list