http://d.puremagic.com/issues/show_bug.cgi?id=5042



--- Comment #3 from bearophile_h...@eml.cc 2012-04-24 18:42:50 PDT ---
In dmd 2.060alpha:


import std.stdio: writeln, writefln;
import std.string: format;
struct Foo { int x; }
void main() {
    writeln(Foo(1)); // ==> Foo(1)
    writefln("%s", Foo(1)); // ==> Foo(1)
    writeln(format("%s", Foo(1))); // run-time error
}


I see this error still:

Foo(1)
Foo(1)
std.format.FormatException@std\format.d(4749): Can't convert test.Foo to
string: "string toString()" not defined


If it's isn't a problem in just my DMD, then I'll reopen this issue...

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to