[Issue 2832] pure function too pure
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Oct 13 03:46:48 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2832
Max Samukha <samukha at voliacable.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |samukha at voliacable.com
--- Comment #2 from Max Samukha <samukha at voliacable.com> 2009-10-13 03:46:47 PDT ---
Instead of introducing another inconsistency into the language for the
not-so-common case, you could take the opposite route:
pure int fun(int d, int divisor)
{
immutable c = d;
int gun() pure { return c + 1; }
return gun() + d / divisor;
}
--
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