Open lriesebos opened 4 years ago
Reverted due to #1547. We should also have regression tests for all these things...
I am not sure if a fix is planned, but an alternative could be to throw a compiler exception when using a with
statement with multiple contexts, basically not supporting the syntax. That will at least prevent silent incorrect behaviour. Unfortunately I am not familiar enough with the ARTIQ compiler at this moment to propose a coded solution myself.
Bug Report
One-Line Summary
When using a
with
statement with multiple items, the behavior is incorrect.Issue Details
Steps to Reproduce
Expected Behavior
The first two nested
with
statements should be semantically equivalent to the lastwith
statement with two items. Therefore, the printed results should also be the same (two times a0
).Actual (undesired) Behavior
Exit functions are called incorrectly:
Your System (omit irrelevant parts)