mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 19:28:26 +08:00
Fix 2f37b1d
.
This commit is contained in:
parent
2dc8d417ca
commit
7516e6d800
@ -564,8 +564,10 @@ class StitchingInferencer(Inferencer):
|
|||||||
if (inspect.ismethod(attr_value) and
|
if (inspect.ismethod(attr_value) and
|
||||||
types.is_instance(object_type) and
|
types.is_instance(object_type) and
|
||||||
# Check that the method is indeed defined on the class,
|
# Check that the method is indeed defined on the class,
|
||||||
# and not just this instance.
|
# and not just this instance. The check is written in
|
||||||
hasattr(type(attr_value), attr_name)):
|
# the inverted form and not as hasattr(type(attr_value))
|
||||||
|
# since the method may as well be defined on a superclass.
|
||||||
|
attr_name not in object_value.__dict__):
|
||||||
# In cases like:
|
# In cases like:
|
||||||
# class c:
|
# class c:
|
||||||
# @kernel
|
# @kernel
|
||||||
|
Loading…
Reference in New Issue
Block a user