projects
/
nmigen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
287a053
)
hdl.xfrm: handle classes that inherit from Record.
author
whitequark
<whitequark@whitequark.org>
Thu, 18 Apr 2019 17:06:33 +0000
(17:06 +0000)
committer
whitequark
<whitequark@whitequark.org>
Thu, 18 Apr 2019 17:06:33 +0000
(17:06 +0000)
nmigen/hdl/xfrm.py
patch
|
blob
|
history
diff --git
a/nmigen/hdl/xfrm.py
b/nmigen/hdl/xfrm.py
index 7c51a6194c3c4f10d05272492debdcb7c8e7041f..1385ce8c59f9da7631d4471a248f1bc91cbd11d8 100644
(file)
--- a/
nmigen/hdl/xfrm.py
+++ b/
nmigen/hdl/xfrm.py
@@
-89,7
+89,8
@@
class ValueVisitor(metaclass=ABCMeta):
new_value = self.on_AnySeq(value)
elif type(value) is Signal:
new_value = self.on_Signal(value)
- elif type(value) is Record:
+ elif isinstance(value, Record):
+ # Uses `isinstance()` and not `type() is` to allow inheriting from Record.
new_value = self.on_Record(value)
elif type(value) is ClockSignal:
new_value = self.on_ClockSignal(value)