forked from M-Labs/artiq
1
0
Fork 0
artiq/lit-test/py2llvm/typing/error_builtin_calls.py

13 lines
381 B
Python
Raw Normal View History

2015-06-26 23:53:20 +08:00
# RUN: %python -m artiq.py2llvm.typing +diag %s >%t
# 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)
# CHECK-L: ${LINE:+1}: error: an argument of range() must be of a numeric type
range([])