mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-05 09:46:36 +08:00
17 lines
426 B
Python
17 lines
426 B
Python
# 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
|
|
|
|
# CHECK-L: ${LINE:+1}: error: function 'f()->NoneType delay('a)' of class 'c' cannot accept a self argument
|
|
c().f()
|
|
|
|
c.g(1)
|
|
# CHECK-L: ${LINE:+1}: error: cannot unify <instance c> with int(width='a) while inferring the type for self argument
|
|
c().g()
|