(AdtPlugin) fixes and regression tests for #581
The new ADT plugin did not handle result expressions in post-conditions yet properly. This PR is a patch to fix a couple of corner cases with additional regression tests.
Thank you for investigating the issue. I assume the PR is WIP until a complete solution is found. If so, please mark the PR as such, so that it doesn't get merged accidentally, or code-reviewed prematurely.
I just converted this PR to draft. Although the work-around in this PR works, I suspect a better solution will come out of #581. It seems to be related to a problem in the transformer logic itself and the final fix is probably better addressed in that part of the code (hoping someone might look alongside to see what the issue is in the transformer, I didn't have much luck spotting it yet :) ). Thanks!