app.d 402 B

123456789
  1. void main()
  2. {
  3. import std.stdio;
  4. scope(exit) writeln("Running scope exit"); // Выполнится самая последняя
  5. scope(success) writeln("Running scope success"); // Выполнится самая первая
  6. return;
  7. scope(exit) writeln("This is never run since the function returned before it was registered."); // Не выполнится
  8. }