From 5dcf936f4e1ff51a6bd3e3366154d8841ce3e094 Mon Sep 17 00:00:00 2001 From: whitequark Date: Wed, 30 Dec 2015 15:46:54 +0800 Subject: [PATCH] transforms.inferencer: don't crash on partially-inferred binary expressions. --- artiq/compiler/transforms/inferencer.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/artiq/compiler/transforms/inferencer.py b/artiq/compiler/transforms/inferencer.py index 2d96d1372..eab103d41 100644 --- a/artiq/compiler/transforms/inferencer.py +++ b/artiq/compiler/transforms/inferencer.py @@ -348,6 +348,10 @@ class Inferencer(algorithm.Visitor): pred, kind = builtins.is_list, "list" else: assert False + + if types.is_var(other.type): + return + if not pred(other.type): printer = types.TypePrinter() note1 = diagnostic.Diagnostic("note",