On Wednesday, 6 August 2014 at 12:41:16 UTC, Artur Skawina via Digitalmars-d wrote:
The compiler can /assume/ that the condition never fails. Hence, it does not need to generate any code to check that the assumption is valid.

Exactly, worse example using a coroutine:

«
label:
…
while(running) { // forevah!
   … yield …
}
…
assume(anything local not assigned below label) // reachable, but never executed
»

is equivalent to:

«
assume(anything local not assigned below label) // optimize based on this
label:
…
while(running) {
   … yield …
}
»

Woops?

Reply via email to