http://d.puremagic.com/issues/show_bug.cgi?id=2423





------- Comment #1 from [EMAIL PROTECTED]  2008-10-26 11:40 -------
There is also a related issue that will show in the same function if that has a
return value:

int foo() {
    do {
        return 1;
    } while  (true);
}

warning - whiletrue.d(4): Error: statement is not reachable
warning - whiletrue.d(1): function whiletrue.foo no return at end of function

I understand that the "no return" is a semantic challenge, but the rule is
fairly simple: if there is a while(true), then all code after it is dead code
unless there is also a break. This is also a regression.

Note that whereas the first is an obvious bug and impossible to workaround,
this one is possible to workaround, but still a question about quality of
implementation. The "no return" bug does also affect/break Tango when using
warnings.


-- 

Reply via email to