https://issues.dlang.org/show_bug.cgi?id=15924
Issue ID: 15924
Summary: [Home]
Product: D
Version: D2
Hardware: x86_64
URL: http://dlang.org/
OS: Linux
Status: NEW
Severity: normal
Priority: P3
Component: phobos
Assignee: [email protected]
Reporter: [email protected]
Following code raises assertion failure (buffer.data() returns empty string).
With the marked line it passes. It seems like formattedWrite is unable to write
to empty appender.
import std.array;
import std.format;
int main() {
Appender!string buffer;
// buffer.put(""); // with this line it passes
formattedWrite(buffer, "foo");
assert("foo" == buffer.data());
return 0;
}
--