www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17628] New: formattedWrite is impure on double

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

          Issue ID: 17628
           Summary: formattedWrite is impure on double
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: qs.il.paperinik gmail.com

pure void main()
{
    import std.format : formattedWrite;
    auto app = appender!string;
    app.formattedWrite!"%s"(1.0);
}

fails. formattedWrite can purely do its job for int and string. It should also
do for floating point types.

--
Jul 09