October 22, 2013 [Issue 11320] New: std.math.fmod, round, trunc are not yet pure | ||||
---|---|---|---|---|
| ||||
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@puremagic.com ReportedBy: bearophile_hugs@eml.cc --- Comment #0 from bearophile_hugs@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: ------- |
Copyright © 1999-2021 by the D Language Foundation