Summary: A pure std.math.floor
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: enhancement
          Priority: P2
         Component: Phobos

--- Comment #0 from 2012-03-11 14:12:35 PDT ---
import std.math: floor;
pure void main() {
    enum double x = floor(2.3);

DMD 2.059head gives:

test.d(3): Error: pure function 'main' cannot call impure function 'floor'
...\dmd2\src\phobos\std\math.d(1917): Error: floorl cannot be interpreted at
compile time, because it has no available source code
test.d(3):        called from here: floor(2.3L)

So there are two problems here, floor is not pure and it can't run at

std.math.fmod() too isn't pure.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to