Summary: Compiler gives error when post-contract is used in a
                    function that returns from inside a loop
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 2012-04-14 08:21:46 PDT ---
When using this code with DMD32 v2.059:

int func()
out(result) { assert(result == 3); }
  while(true) {
    return 3;

void main() {

The compiler produces the following error:
bug.d(1): Error: function bug.func no return exp; or assert(0); at end of

The error also happens when a 'for' is used instead of 'while'.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to