2015-07-03 00:35:35 +08:00
|
|
|
# RUN: %python -m artiq.compiler.testbench.inferencer +diag %s >%t
|
2015-06-06 22:15:06 +08:00
|
|
|
# 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, []]
|
2015-06-11 09:22:31 +08:00
|
|
|
# CHECK-L: note: a list element of type int(width='a)
|
2015-06-11 08:55:06 +08:00
|
|
|
# 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
|
2015-06-12 13:59:41 +08:00
|
|
|
|
2015-06-14 17:07:13 +08:00
|
|
|
# CHECK-L: ${LINE:+1}: error: expected unary '+' operand to be of numeric type, not list(elt='a)
|
2015-06-13 18:45:09 +08:00
|
|
|
+[]
|
|
|
|
|
2015-06-14 17:07:13 +08:00
|
|
|
# CHECK-L: ${LINE:+1}: error: expected '~' operand to be of integer type, not float
|
2015-06-13 18:45:09 +08:00
|
|
|
~1.0
|
2015-06-13 18:50:56 +08:00
|
|
|
|
|
|
|
# CHECK-L: ${LINE:+1}: error: type int(width='a) does not have an attribute 'x'
|
|
|
|
(1).x
|
2015-07-22 04:39:22 +08:00
|
|
|
|
|
|
|
# CHECK-L: ${LINE:+1}: error: cannot unify int(width='a) with bool
|
|
|
|
1 if 1 else 1
|
|
|
|
|
|
|
|
# CHECK-L: ${LINE:+1}: error: cannot unify int(width='a) with bool
|
|
|
|
if 1: pass
|
|
|
|
|
|
|
|
# CHECK-L: ${LINE:+1}: error: cannot unify int(width='a) with bool
|
|
|
|
while 1: pass
|