-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
transforms.iodelay_estimator: reject control flow in 'with parallel:' (…
…fixes #195).
whitequark
committed
Dec 18, 2015
1 parent
64ad388
commit 2759310
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# RUN: %python -m artiq.compiler.testbench.signature +diag %s >%t | ||
# RUN: OutputCheck %s --file-to-check=%t | ||
|
||
def f(): | ||
# CHECK-L: ${LINE:+1}: error: cannot interleave this 'with parallel:' statement | ||
with parallel: | ||
# CHECK-L: ${LINE:+1}: note: this 'return' statement transfers control out of the 'with parallel:' statement | ||
return | ||
delay(1.0) | ||
|
||
def g(): | ||
while True: | ||
# CHECK-L: ${LINE:+1}: error: cannot interleave this 'with parallel:' statement | ||
with parallel: | ||
# CHECK-L: ${LINE:+1}: note: this 'break' statement transfers control out of the 'with parallel:' statement | ||
break | ||
delay(1.0) |