https://issues.dlang.org/show_bug.cgi?id=22017
--- Comment #1 from FeepingCreature <[email protected]> --- As far as I can tell, what happens is that with() thinks that it doesn't need to generate a temporary variable because its expression is an lvalue, due to the ref return. Since the expression *does* result in a temporary cleanup with destructor, however, the destructor is inserted immediately after the with() expression, instead of after the body. --
