mergeSuppressed already handles fatal exceptions in other properly, so the following line is useless:
acc mergeSuppressed e.nonFatalOrThrow()
Even worse, it throws CancellationException too eagerly. This doesn't match the behavior of resourceScope, for one.
changing it to acc mergeSuppressed e would fix the issue!
mergeSuppressedalready handles fatal exceptions inotherproperly, so the following line is useless:Even worse, it throws
CancellationExceptiontoo eagerly. This doesn't match the behavior ofresourceScope, for one.changing it to
acc mergeSuppressed ewould fix the issue!