There are probably implementation reasons for it working this way. I think it's perfectly acceptable for the majority of cases, and for the edge cases where you want something like this, you can of course always do this.

void foo(int y)
out(val) {
   ...
} body {
   int val;

   ...

   assert(y != 0);

   return val;
}

Of course, you'd need to return only at the end of the function for that, but there are ways around that, like inner functions, or perhaps goto end. (Although I don't advocate use of goto.)

Reply via email to