void main() {
try assert(0);
finally assert(0);
}
With DMD 2.112, this will print far more (possibly infinitely more) than the expected two stack traces, at least on linux. On windows, it appears to hang instead.
The same result is observed with the equivalent in scope statements:
void main() {
scope(exit) assert(0);
assert(0);
}
This problem also exists in GCC 16.2.1 and LDC 1.42.0, pointing to a frontend issue. I could not test if this was a regression - run.dlang.io REALLY does not like running this program, unsurprisingly.
With DMD 2.112, this will print far more (possibly infinitely more) than the expected two stack traces, at least on linux. On windows, it appears to hang instead.
The same result is observed with the equivalent in scope statements:
This problem also exists in GCC 16.2.1 and LDC 1.42.0, pointing to a frontend issue. I could not test if this was a regression - run.dlang.io REALLY does not like running this program, unsurprisingly.