2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-19 16:36:29 +08:00
artiq/lit-test/py2llvm/typing/error_unify.py
2015-06-12 08:59:41 +03:00

22 lines
643 B
Python

# RUN: %python -m artiq.py2llvm.typing +diag %s >%t
# RUN: OutputCheck %s --file-to-check=%t
a = 1
b = []
# CHECK-L: ${LINE:+1}: error: cannot unify int(width='a) with list(elt='b)
a = b
# CHECK-L: ${LINE:+1}: error: cannot unify int(width='a) with list(elt='b)
[1, []]
# CHECK-L: note: a list element of type int(width='a)
# CHECK-L: note: a list element of type list(elt='b)
# CHECK-L: ${LINE:+1}: error: cannot unify int(width='a) with bool
1 and False
# CHECK-L: note: an operand of type int(width='a)
# CHECK-L: note: an operand of type bool
# CHECK-L: ${LINE:+1}: error: expected operand to be of numeric type, not list(elt='a)
~[]