http://d.puremagic.com/issues/show_bug.cgi?id=3715
Summary: std.string.format can't use const/immutable toString
functions
Product: D
Version: 2.036
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Tomasz SowiĆski <[email protected]> 2010-01-17 09:11:29
PST ---
Test case:
struct A {
string toString() const {
return "A";
}
}
void main() {
writeln(format("%s", A()));
}
Outputs:
std.format.FormatError: std.format Can't convert test.A to string: "string
toStr
ing()" not defined
Same for immutable.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------