2015-12-18 21:02:38 +08:00
|
|
|
# RUN: %python -m artiq.compiler.testbench.signature +diag %s >%t
|
|
|
|
# RUN: OutputCheck %s --file-to-check=%t
|
|
|
|
|
|
|
|
def f():
|
2016-02-22 21:24:43 +08:00
|
|
|
# CHECK-L: ${LINE:+1}: error: cannot interleave this 'with interleave:' statement
|
|
|
|
with interleave:
|
|
|
|
# CHECK-L: ${LINE:+1}: note: this 'return' statement transfers control out of the 'with interleave:' statement
|
2015-12-18 21:02:38 +08:00
|
|
|
return
|
|
|
|
delay(1.0)
|
|
|
|
|
|
|
|
def g():
|
|
|
|
while True:
|
2016-02-22 21:24:43 +08:00
|
|
|
# CHECK-L: ${LINE:+1}: error: cannot interleave this 'with interleave:' statement
|
|
|
|
with interleave:
|
|
|
|
# CHECK-L: ${LINE:+1}: note: this 'break' statement transfers control out of the 'with interleave:' statement
|
2015-12-18 21:02:38 +08:00
|
|
|
break
|
|
|
|
delay(1.0)
|