https://d.puremagic.com/issues/show_bug.cgi?id=12170
Peter Alexander <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] | |m OS/Version|Windows |All --- Comment #1 from Peter Alexander <[email protected]> 2014-02-15 06:09:57 PST --- The problem is this: "Cyclic functions (i.e. functions that wind up directly or indirectly calling themselves) are inferred as being impure, throwing, and @system." http://dlang.org/function.html sum uses a recursive algorithm for summing floating point ranges for extra accuracy, so its purity is not inferred. It cannot just be marked as pure because the range operations it uses may not be pure. I'm not sure why that cyclic function restriction exists. I think it should be possible to infer these attributes on recursive functions. I'll have a think. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
