On 9/28/16 7:40 PM, Andrei Alexandrescu wrote:
// With scope
void assertNot(string s)
{
try { scope(success) assert(0, s); decode(s,DecodeMode.STRICT); }
catch (DecodeException e) {}
}
Sorry, this is not semantically equivalent. Replace with:
// With scope
void assertNot(string s)
{
try { decode(s,DecodeMode.STRICT); }
catch (DecodeException e) { return; }
assert(0, s);
}
Andrei
