A array bug?
taqya
taqya9 at gmail.com
Thu Feb 5 07:27:13 PST 2009
Chris Nicholson-Sauls Wrote:
> Stewart Gordon wrote:
> > Ellery Newcomer wrote:
> >> taqya wrote:
> > <snip>
> >>> char[] a = "a".dup;
> >>> char[] b = "b".dup;
> >>> writefln(a + b); //Error: Array operations not implemented
> > <snip>
> >> If so, the error informs you why you can't do that.
> > <snip>
> >
> > Except that it doesn't. "Array operations not implemented" is a
> > leftover from a previous version of the D spec. Nowadays array
> > operations _are_ implemented, but the language doesn't support this
> > particular use thereof. So the bug is that the error message is badly
> > written.
> >
> > Stewart.
>
> Suggest: Array operation '<OP>' not implemented for type <T>[].
>
> Where <OP> is here '+' and <T> is here char.
>
> And possibly catch the particular case of char[] and suggest '~', since
> it is probably the single most common mistake in this area.
>
> -- Chris Nicholson-Sauls
import std.stdio;
void main()
{
char[] a = "a".dup;
char[] b = "b".dup;
writefln(a+b);
}
I compile the code on Windows. Then pop up a message 'dmd.exe has stopped working'. my personal situation?
More information about the Digitalmars-d-learn
mailing list