2015-07-03 00:35:35 +08:00
|
|
|
# RUN: %python -m artiq.compiler.testbench.inferencer +diag %s >%t
|
2015-06-11 08:55:06 +08:00
|
|
|
# RUN: OutputCheck %s --file-to-check=%t
|
|
|
|
|
|
|
|
# CHECK-L: ${LINE:+2}: error: cannot unify int(width='a) with NoneType
|
|
|
|
# CHECK-L: ${LINE:+1}: note: function with return type int(width='a)
|
|
|
|
def a():
|
|
|
|
return 1
|
|
|
|
# CHECK-L: ${LINE:+1}: note: a statement returning NoneType
|
|
|
|
return
|
|
|
|
|
|
|
|
# CHECK-L: ${LINE:+2}: error: cannot unify int(width='a) with list(elt='b)
|
|
|
|
# CHECK-L: ${LINE:+1}: note: function with return type int(width='a)
|
|
|
|
def b():
|
|
|
|
return 1
|
|
|
|
# CHECK-L: ${LINE:+1}: note: a statement returning list(elt='b)
|
|
|
|
return []
|