forked from M-Labs/artiq
1
0
Fork 0
artiq/lit-test/test/inferencer/class.py

20 lines
426 B
Python
Raw Normal View History

# RUN: %python -m artiq.compiler.testbench.inferencer %s >%t
# RUN: OutputCheck %s --file-to-check=%t
class c:
a = 1
def f():
pass
2015-08-19 13:39:22 +08:00
def m(self):
pass
2015-08-28 13:51:31 +08:00
# CHECK-L: c:<constructor c {a: int(width='a), f: ()->NoneType, m: (self:<instance c>)->NoneType}>
c
# CHECK-L: .a:int(width='a)
c.a
# CHECK-L: .f:()->NoneType
c.f
2015-08-19 13:39:22 +08:00
2015-08-28 13:51:31 +08:00
# CHECK-L: .m:method(fn=(self:<instance c>)->NoneType, self=<instance c>)
2015-08-19 13:39:22 +08:00
c().m()