www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15321] New: std.format.format is impure for doubles

https://issues.dlang.org/show_bug.cgi?id=15321

          Issue ID: 15321
           Summary: std.format.format is impure for doubles
           Product: D
           Version: D2
          Hardware: x86
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: lt.infiltrator gmail.com

===============
import std.format;

void main() pure  safe {
   format("%s", 1.0);
}
===============
Compilation output:
test.d(5): Error: pure function 'D main' cannot call impure function
'std.format.format!(char, double).format'
===============

--
Nov 11 2015