bug or feature?

bobef be at lessequal_dontspam.com
Tue Dec 5 05:56:25 PST 2006


import std.stdio;
import std.string;

void main()
{
	char[] a;
	char[][] b;
	a~="1234";
	b~=a;
	a.length=0;
	a~="&&";
	b~=a;
	a.length=0;
	a~="asdf";
	b~=a;
	writefln(join(b," "));
}

//outputs "asdf as asdf"

//if we (replace a~="..." with a="...") || (replace a.length=0 with 
a=null) || (replace b~=a with b~=a.dup) then it outputs "1234 && asdf"

//i don't know if this is bug or new feature since last time i used d



More information about the Digitalmars-d-bugs mailing list