Making AssertError a singleton
Andrei Alexandrescu via Digitalmars-d
digitalmars-d at puremagic.com
Tue Dec 13 08:47:25 PST 2016
On 12/13/2016 11:39 AM, Timon Gehr wrote:
> On 13.12.2016 01:57, Andrei Alexandrescu wrote:
>> On 12/12/16 4:35 PM, Brad Roberts via Digitalmars-d wrote:
>>> Of course, then you'll find the fun of all the tests (and probably code)
>>> that catch AssertError.
>>
>> You can catch AssertError. There's no guarantees dtors have been called
>> during unwinding. -- Andrei
>
>
> If 'in'-contracts are not allowed to corrupt the program state, then I
> don't really see how implementations will be able to not call dtors.
One way to accomplish that is to have assert work differently when
called from within contracts. (I'm not sure whether that's currently
done that way.) -- Andrei
More information about the Digitalmars-d
mailing list