forked from M-Labs/artiq
1
0
Fork 0

transforms.iodelay_estimator: do not unify indeterminate delays.

This commit is contained in:
whitequark 2015-11-17 00:59:09 +03:00
parent 841e01a8bb
commit 10f82ff2c8
1 changed files with 6 additions and 0 deletions

View File

@ -101,6 +101,12 @@ class IODelayEstimator(algorithm.Visitor):
self.current_return = old_return
self.current_args = old_args
if types.is_indeterminate_delay(delay) and types.is_indeterminate_delay(typ.delay):
# Both delays indeterminate; no point in unifying since that will
# replace the lazy and more specific error with an eager and more generic
# error (unification error of delay(?) with delay(?), which is useless).
return
try:
typ.delay.unify(delay)
except types.UnificationError as e: