From 00164390a15111993e35211a144db2ee9c743b3c Mon Sep 17 00:00:00 2001 From: whitequark Date: Fri, 27 Nov 2015 17:10:36 +0800 Subject: [PATCH] compiler.types: fix TDelay.unify(TVar()). --- artiq/compiler/types.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/artiq/compiler/types.py b/artiq/compiler/types.py index 08d9fcd2c..16f21c913 100644 --- a/artiq/compiler/types.py +++ b/artiq/compiler/types.py @@ -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)