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):
|
def unify(self, other):
|
||||||
other = other.find()
|
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():
|
self.duration.fold() == other.duration.fold():
|
||||||
pass
|
pass
|
||||||
elif isinstance(other, TVar):
|
|
||||||
other.unify(self)
|
|
||||||
else:
|
else:
|
||||||
raise UnificationError(self, other)
|
raise UnificationError(self, other)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue