2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 03:08:27 +08:00

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

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