hdl.xfrm: handle classes that inherit from Record.

This commit is contained in:
whitequark 2019-04-18 17:06:33 +00:00
parent 287a0531b3
commit dda8f34d39

View file

@ -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)