This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Description
Describe the bug
When a conditional includes nested conditionals that are invalid for lifting, the outer conditional may incorrectly be lifted into a generated callable by the ConditionallyControlled rewrite step. See discussion with concrete examples in comments here #767 (comment).
To Reproduce
Remove the Skip condition from this test in the ClassicallyControlledSupportTests.qs and run it. The test contains a nested condition with a return statement in it. Neither of the conditionals should be lifted into their own callables because of the return statement. However, the outer condition does get lifted, resulting in incorrect behavior.
Expected behavior
The test should pass. Because the inner conditional contains a return statement, neither the inner conditional nor the outer conditional should be lifted into their own callables.