Place function bodies in labelled block expression instead of closures

This merge request changes the way the return value of a contract-bound function is captured from the body to be available for post-conditions. Instead of enclosing the body in a closure, it is placed in a labelled block expression, with body's return expressions converted to labelled break expressions to prevent skipping of post-conditions.

This fixes several bugs caused by the body-enclosing closure borrowing from or otherwise interfering with the function.

Fixes #11 Fixes #16 Fixes #17

Merge request reports

Loading