[Issue 11320] New: std.math.fmod, round, trunc are not yet pure
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Oct 21 17:43:26 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11320
Summary: std.math.fmod, round, trunc are not yet pure
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: enhancement
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2013-10-21 17:43:25 PDT ---
void main() pure {
import std.math: fmod, round, trunc;
auto r1 = fmod(5.1, 1.5);
auto r2 = round(5.1);
auto r3 = trunc(5.1);
}
dmd 2.064beta2 gives:
test.d(3): Error: pure function 'D main' cannot call impure function
'std.math.fmod'
test.d(4): Error: pure function 'D main' cannot call impure function
'std.math.round'
test.d(5): Error: pure function 'D main' cannot call impure function
'std.math.trunc'
--
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