http://d.puremagic.com/issues/show_bug.cgi?id=9588
Andrej Mitrovic <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|format prints "null" for |format prints context |struct functions |pointer for struct --- Comment #1 from Andrej Mitrovic <[email protected]> 2013-02-25 18:11:48 PST --- (In reply to comment #0) > import std.string; > import std.stdio; > > void main() > { > struct S { int x; bool empty() { return false; } } > writeln( format("%s", S()) ); > } > > > S(0, null) > > It shouldn't try to print the function. I think this should also apply to > property functions since e.g. "empty" is typically a property function. Oh wait a minute, I know what this is. It's the hidden context pointer. If you change the struct to 'static' the null disappears. But I don't think format() should print that. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
