Re: scope(faliure) flow control.

2013-12-28 Thread Ali Çehreli
On 12/28/2013 12:50 PM, "Casper Færgemand" " wrote: > On Saturday, 28 December 2013 at 20:31:14 UTC, TheFlyingFiddle wrote: >> int foo() >> { >>scope(failure) return 22; >>throw new Exception("E"); >> } >> >> unittest >> { >>assert(foo() == 22); >> } >> >> Is this defined behavior? At

Re: scope(faliure) flow control.

2013-12-28 Thread Casper Færgemand
On Saturday, 28 December 2013 at 20:31:14 UTC, TheFlyingFiddle wrote: int foo() { scope(failure) return 22; throw new Exception("E"); } unittest { assert(foo() == 22); } Is this defined behavior? At least in x64 dmd the exception is swallowed and the assert evaluates to true. In any