forked from M-Labs/artiq
1
0
Fork 0

transforms.inferencer: allow variable as type of `n` in `[]*n`.

Fixes #473.
This commit is contained in:
whitequark 2016-06-16 13:32:14 +00:00
parent 53eb35cbb8
commit 26117e8d93
1 changed files with 1 additions and 1 deletions

View File

@ -407,7 +407,7 @@ class Inferencer(algorithm.Visitor):
return
elif builtins.is_list(left.type) or builtins.is_list(right.type):
list_, other = self._order_by_pred(builtins.is_list, left, right)
if not builtins.is_int(other.type):
if not builtins.is_int(other.type) and not types.is_var(other.type):
printer = types.TypePrinter()
note1 = diagnostic.Diagnostic("note",
"list operand of type {typea}",