https://issues.dlang.org/show_bug.cgi?id=22099
Walter Bright <bugzi...@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzi...@digitalmars.com Resolution|--- |INVALID --- Comment #2 from Walter Bright <bugzi...@digitalmars.com> --- The trouble here is that a RangeError is being thrown. A RangeError is an Error, and finally blocks are not executed when unwinding an Error. The rationale is that Errors are fatal, and may be thrown because the program has entered an invalid state. Executing finally blocks may cause further undefined behavior. Changing the exception type to Exception causes the program to work as expected, as Exceptions execute finally blocks when unwinding. Marked as INVALID. --