artiq/lit-test/test/inferencer/error_builtin_calls.py

16 lines
487 B
Python
Raw Normal View History

# RUN: %python -m artiq.compiler.testbench.inferencer +diag %s >%t
2015-06-26 23:53:20 +08:00
# RUN: OutputCheck %s --file-to-check=%t
a = 1
# CHECK-L: ${LINE:+1}: error: the width argument of int() must be an integer literal
int(1.0, width=a)
# CHECK-L: ${LINE:+1}: error: the argument of len() must be of an iterable type
len(1)
2015-06-27 00:14:24 +08:00
# CHECK-L: ${LINE:+1}: error: the argument of list() must be of an iterable type
list(1)
2015-08-11 05:41:31 +08:00
# CHECK-L: ${LINE:+1}: error: an argument of range() must be of an integer type
2015-06-26 23:53:20 +08:00
range([])