2015-06-06 22:15:06 +08:00
|
|
|
# RUN: %python -m artiq.py2llvm.typing +diag %s >%t
|
|
|
|
# RUN: OutputCheck %s --file-to-check=%t
|
|
|
|
|
|
|
|
a = 1
|
|
|
|
b = []
|
|
|
|
|
2015-06-11 08:55:06 +08:00
|
|
|
# CHECK-L: ${LINE:+1}: error: cannot unify int(width='a) with list(elt='b)
|
2015-06-06 22:15:06 +08:00
|
|
|
a = b
|
2015-06-11 08:55:06 +08:00
|
|
|
|
|
|
|
# CHECK-L: ${LINE:+1}: error: cannot unify int(width='a) with list(elt='b)
|
|
|
|
[1, []]
|
|
|
|
# CHECK-L: note: a list of type list(elt=int(width='a))
|
|
|
|
# CHECK-L: note: a list element of type list(elt='b)
|
2015-06-11 09:20:33 +08:00
|
|
|
|
|
|
|
# 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
|