mirror of https://github.com/m-labs/artiq.git
Commit missing parts of 919a49b6
.
This commit is contained in:
parent
f838b8be49
commit
6bd16e448e
|
@ -9,7 +9,7 @@ class contextmgr:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def foo():
|
def foo():
|
||||||
# CHECK-L: ${LINE:+2}: error: function '__enter__(self:<instance contextmgr {}>, n1:'a)->NoneType delay('b)' must accept 1 positional argument and no optional arguments
|
# CHECK-L: ${LINE:+2}: error: function '__enter__(self:<instance contextmgr>, n1:'a)->NoneType delay('b)' must accept 1 positional argument and no optional arguments
|
||||||
# CHECK-L: ${LINE:+1}: error: function '__exit__(self:<instance contextmgr>, n1:'c, n2:'d)->NoneType delay('e)' must accept 4 positional arguments and no optional arguments
|
# CHECK-L: ${LINE:+1}: error: function '__exit__(self:<instance contextmgr>, n1:'c, n2:'d)->NoneType delay('e)' must accept 4 positional arguments and no optional arguments
|
||||||
with contextmgr():
|
with contextmgr():
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -11,6 +11,6 @@ class contextmgr:
|
||||||
|
|
||||||
def foo():
|
def foo():
|
||||||
# CHECK-L: ${LINE:+2}: error: cannot unify int(width='a) with NoneType
|
# CHECK-L: ${LINE:+2}: error: cannot unify int(width='a) with NoneType
|
||||||
# CHECK-L: ${LINE:+1}: note: exception handling via context managers is not supported; the argument 'n3' of function '__exit__(self:<instance contextmgr {}>, n1:NoneType, n2:NoneType, n3:int(width='a))->NoneType delay('b)' will always be None
|
# CHECK-L: ${LINE:+1}: note: exception handling via context managers is not supported; the argument 'n3' of function '__exit__(self:<instance contextmgr>, n1:NoneType, n2:NoneType, n3:int(width='a))->NoneType delay('b)' will always be None
|
||||||
with contextmgr():
|
with contextmgr():
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -11,7 +11,7 @@ class contextmgr:
|
||||||
def foo():
|
def foo():
|
||||||
contextmgr.__enter__(1)
|
contextmgr.__enter__(1)
|
||||||
# CHECK-L: ${LINE:+3}: error: cannot unify <instance contextmgr> with int(width='a) while inferring the type for self argument
|
# CHECK-L: ${LINE:+3}: error: cannot unify <instance contextmgr> with int(width='a) while inferring the type for self argument
|
||||||
# CHECK-L: ${LINE:+2}: note: expression of type <instance contextmgr {}>
|
# CHECK-L: ${LINE:+2}: note: expression of type <instance contextmgr>
|
||||||
# CHECK-L: ${LINE:+1}: note: reference to an instance with a method '__enter__(self:int(width='a))->NoneType delay('b)'
|
# CHECK-L: ${LINE:+1}: note: reference to an instance with a method '__enter__(self:int(width='a))->NoneType delay('b)'
|
||||||
with contextmgr():
|
with contextmgr():
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# RUN: %python -m artiq.compiler.testbench.signature %s >%t
|
# RUN: %python -m artiq.compiler.testbench.signature %s >%t
|
||||||
# RUN: OutputCheck %s --file-to-check=%t
|
# RUN: OutputCheck %s --file-to-check=%t
|
||||||
|
|
||||||
# CHECK-L: g: (i:<instance c {}>)->NoneType delay(1000000 mu)
|
# CHECK-L: g: (i:<instance c>)->NoneType delay(1000000 mu)
|
||||||
def g(i):
|
def g(i):
|
||||||
i.f(1.0)
|
i.f(1.0)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue