forked from M-Labs/artiq
compiler.types: fix TDelay.unify(TVar()).
This commit is contained in:
parent
4b410ce720
commit
00164390a1
|
@ -500,11 +500,11 @@ class TDelay(Type):
|
|||
def unify(self, other):
|
||||
other = other.find()
|
||||
|
||||
if self.is_fixed() and other.is_fixed() and \
|
||||
if isinstance(other, TVar):
|
||||
other.unify(self)
|
||||
elif self.is_fixed() and other.is_fixed() and \
|
||||
self.duration.fold() == other.duration.fold():
|
||||
pass
|
||||
elif isinstance(other, TVar):
|
||||
other.unify(self)
|
||||
else:
|
||||
raise UnificationError(self, other)
|
||||
|
||||
|
|
Loading…
Reference in New Issue