"".dup is null

Qian Xu quian.xu at stud.tu-ilmenau.de
Mon May 4 06:46:57 PDT 2009


Hi All,

The following code will throw an exception: 
  char[] s;
  assert( s.dup  is null); // OK
  assert("".dup !is null); // FAILED

"".dup is expectly also an empty string. 
Is this a compiler bug?

--Qian




More information about the Digitalmars-d-learn mailing list