Re: writefln on interface array

2010-04-08 Thread Steven Schveighoffer
On Wed, 07 Apr 2010 07:13:07 -0400, strtr wrote: Is it possible to have this output [null,"1"] in stead of Error: std.format formatArg? interface I{} class C:I{ int index; char[] toString(){ return toString(index) } } I[2] two_i; I[1] = new C(); writefln(two_i); Would be handy for debugg

Re: writefln on interface array

2010-04-07 Thread strtr
Ellery Newcomer Wrote: > > s/interface I{}/interface I{ char[] toString(); }/ > s/writefln(two_i)/writefln("%s",two_i)/ > > ? no :( > > or see bug 535 voted ++

Re: writefln on interface array

2010-04-07 Thread Ellery Newcomer
On 04/07/2010 06:13 AM, strtr wrote: Is it possible to have this output [null,"1"] in stead of Error: std.format formatArg? interface I{} class C:I{ int index; char[] toString(){ return toString(index) } } I[2] two_i; I[1] = new C(); writefln(two_i); Would be handy for debugging ;) s/int

writefln on interface array

2010-04-07 Thread strtr
Is it possible to have this output [null,"1"] in stead of Error: std.format formatArg? interface I{} class C:I{ int index; char[] toString(){ return toString(index) } } I[2] two_i; I[1] = new C(); writefln(two_i); Would be handy for debugging ;)