mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-21 09:26:29 +08:00
18 lines
669 B
Python
18 lines
669 B
Python
# 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)
|