import std.stdio; import std.string; struct Wrap { string a; alias a this; } struct Foo { Wrap wrap; string toString() { return format("%s", wrap); } } void main() { Foo foo; writeln(foo); } std.format.FormatException@std\format.d(4400): Can't convert test.Wrap to string: "string toString()" not defined
See also issue 7922
(In reply to comment #1) > See also issue 7922 No, this is std.string.format function problem, then it is Phobos issue. And 7922 is a dmd issue. So they are not related.
*** This issue has been marked as a duplicate of issue 6595 ***