forked from M-Labs/artiq
1
0
Fork 0

compiler.types: fix TDelay.unify(TVar()).

This commit is contained in:
whitequark 2015-11-27 17:10:36 +08:00
parent 4b410ce720
commit 00164390a1
1 changed files with 3 additions and 3 deletions

View File

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