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