Skip to content

Commit

Permalink
Add isinstance check
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardt committed May 11, 2022
1 parent 024f6a2 commit acb8b8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions magma/bit.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import functools
import hwtypes as ht
from hwtypes.bit_vector_abc import AbstractBit, TypeFamily
from .t import Direction
from .t import Direction, Type
from .digital import Digital, DigitalMeta
from .digital import VCC, GND # TODO(rsetaluri): only here for b.c.

Expand Down Expand Up @@ -120,7 +120,7 @@ def wire(self, o, debug_info):

@classmethod
def is_wireable(cls, rhs):
if rhs.is_bits_1():
if issubclass(rhs, Type) and rhs.is_bits_1():
return True
return DigitalMeta.is_wireable(cls, rhs)

Expand Down

0 comments on commit acb8b8b

Please sign in to comment.