The first one should fail since the string has length 0. If you use an .idup you would get the correct results:
void main() { string s = "".idup; assert(s); // fails assert(s != null); // ok } So I guess it's a bug. On 12/12/10, Tomek Sowiński <j...@ask.me> wrote: > string s = ""; > assert(s); // ok > assert(s != null); // fails > > I guess that's a bug. But which one is right? > > -- > Tomek >