This is self-check in the compiler, confirming that destination-passing isn't generating code that violates its intended invariants.
As written, there are two problems:
I don't know what the rules should be for destinations appearing inside loop bodies. Current tweak permits a loop to just close over a destination and use it (once).
Each arm of a case should be able to use a destination independently, but the current draft gets this wrong. However, it seems that we don't destination-pass through case anyway, so the test suite still passes.
This is self-check in the compiler, confirming that destination-passing isn't generating code that violates its intended invariants.
As written, there are two problems:
I don't know what the rules should be for destinations appearing inside loop bodies. Current tweak permits a loop to just close over a destination and use it (once).
Each arm of a
case
should be able to use a destination independently, but the current draft gets this wrong. However, it seems that we don't destination-pass throughcase
anyway, so the test suite still passes.