I have this code: ========== class S
...
auto create() { writeln("-> ",__PRETTY_FUNCTION__); scope(exit) writeln("<- ",__PRETTY_FUNCTION__); return scoped!S(1); }
If you replace this line with "return new S(1)" it should work as you expect.
ikod via Digitalmars-d-learn Fri, 18 Sep 2020 03:55:37 -0700
I have this code: ========== class S
...
auto create() { writeln("-> ",__PRETTY_FUNCTION__); scope(exit) writeln("<- ",__PRETTY_FUNCTION__); return scoped!S(1); }
If you replace this line with "return new S(1)" it should work as you expect.