On Sat, 9 Feb 2013 18:03:53 +0900 kenji hara <[email protected]> wrote:
> 2013/2/9 Nick Sabalausky <[email protected]> > > > On Fri, 8 Feb 2013 18:25:27 -0500 > > Nick Sabalausky <[email protected]> wrote: > > One of the problems turned out to be the following, which I'm > > guessing is probably intentional?: > > > > import std.stdio; > > > > struct Foo > > { > > string toString() > > { > > return "hello"; > > } > > } > > > > void main() > > { > > const f = Foo(); > > > > // In 2.061 and up, this outputs "const(Foo)()" > > // instead of "hellO". A fixed bug? > > writeln(f); > > } > > > > This behavior (formatting const Foo object by writeln) is at least > from 2.058. > > The result of const Foo object formatting by std.string.format is > changed from 2.061, to make it consistent with the result by writeln. > Ok, my original code *is* using format which is why it didn't break until 2.061. I ended up changing it to writefln only for the minimized test case above. Didn't realize there was a difference. _______________________________________________ dmd-beta mailing list [email protected] http://lists.puremagic.com/mailman/listinfo/dmd-beta
