МВ
Size: a a a
МВ
МВ
DH
МВ
DH
AB
OB
import std.stdio;
void foo(int x)
{
scope (exit) stderr.writeln("exit");
scope (failure) stderr.writeln("failure");
scope (success) stderr.writeln("success");
assert (x < 10);
}
void main()
{
foo(5);
foo(10);
}
success
exit
failure
exit
core.exception.AssertError@scope_exit.d(9): Assertion failure
----------------
??:? [0x446aa5]
??:? [0x452426]
??:? [0x4345ed]
??:? [0x42d18c]
??:? [0x40405c]
??:? [0x4041d7]
??:? [0x4342bb]
??:? [0x4341b7]
??:? [0x43400d]
??:? [0x404204]
??:? __libc_start_main [0x7f19700f5f42]
??:? [0x403f1d]
AB