forked from M-Labs/artiq
1
0
Fork 0

transforms.inferencer: don't crash on partially-inferred binary expressions.

This commit is contained in:
whitequark 2015-12-30 15:46:54 +08:00
parent 6938036b28
commit 5dcf936f4e
1 changed files with 4 additions and 0 deletions

View File

@ -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",