[Issue 15166] [REG2.069-devel] spurious statement not reachable warning in static foreach loop
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Mon Oct 12 15:59:53 PDT 2015
    
    
  
https://issues.dlang.org/show_bug.cgi?id=15166
--- Comment #4 from Martin Nowak <code at dawg.eu> ---
A workaround is to use a variable.
bool res = true;
foreach (index, element; Group1.expand)
{
    static if (!is(Group1.expand[index] == Group2.expand[index]))
    {
        res = false;
        break;
    }
}
return res;
--
    
    
More information about the Digitalmars-d-bugs
mailing list