2015-08-19 13:39:22 +08:00
|
|
|
# RUN: %python -m artiq.compiler.testbench.inferencer +diag %s >%t
|
|
|
|
# RUN: OutputCheck %s --file-to-check=%t
|
|
|
|
|
|
|
|
class c:
|
|
|
|
def f():
|
|
|
|
pass
|
|
|
|
|
|
|
|
def g(self):
|
|
|
|
pass
|
|
|
|
|
2015-11-17 06:04:08 +08:00
|
|
|
# CHECK-L: ${LINE:+1}: error: function 'f()->NoneType delay('a)' of class 'c' cannot accept a self argument
|
2015-08-19 13:39:22 +08:00
|
|
|
c().f()
|
|
|
|
|
|
|
|
c.g(1)
|
2015-08-28 13:51:31 +08:00
|
|
|
# CHECK-L: ${LINE:+1}: error: cannot unify <instance c> with int(width='a) while inferring the type for self argument
|
2015-08-19 13:39:22 +08:00
|
|
|
c().g()
|