On 8/24/2011 1:09 AM, kennytm wrote:
Not sure if it's a big enough problem, but what about dangling else of this
form?

     if (a.length>  0)
         foreach (i, ref e; a)
             if (i>  0)
                  e += a[i-1];
     else      // oops
         throw new Exception("empty array");

That wouldn't be complained about with what I suggested. This isn't the dangling else problem, though, it's just bad indenting.

Reply via email to