2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-19 00:16:29 +08:00
artiq/lit-test/test/iodelay/error_arith.py

22 lines
725 B
Python

# RUN: %python -m artiq.compiler.testbench.signature +diag +delay %s >%t
# RUN: OutputCheck %s --file-to-check=%t
def f(a):
b = 1.0
# CHECK-L: ${LINE:+3}: error: this call cannot be interleaved
# CHECK-L: ${LINE:+2}: note: this variable is not an argument of the innermost function
# CHECK-L: ${LINE:-4}: note: only these arguments are in scope of analysis
delay(b)
def g():
# CHECK-L: ${LINE:+2}: error: this call cannot be interleaved
# CHECK-L: ${LINE:+1}: note: this operator is not supported
delay(2.0**2)
def h():
# CHECK-L: ${LINE:+2}: error: this call cannot be interleaved
# CHECK-L: ${LINE:+1}: note: this expression is not supported
delay_mu(1 if False else 2)
f(1)