Notice/Warning on narrowStrings .length

Adam D. Ruppe destructionator at gmail.com
Mon Apr 23 16:07:44 PDT 2012


On Monday, 23 April 2012 at 23:01:59 UTC, James Miller wrote:
> Is is reasonable for the compiler to pick this up during 
> semantic analysis and point out this situation?


Maybe... but it is important that this works:

string s;

if(s.length)
    do_something(s);

since that's always right and quite common.


More information about the Digitalmars-d mailing list