Skip to content

Commit

Permalink
transforms.inferencer: allow variable as type of n in []*n.
Browse files Browse the repository at this point in the history
Fixes #473.
whitequark authored and sbourdeauducq committed Jun 17, 2016
1 parent 3589528 commit 770dda6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion artiq/compiler/transforms/inferencer.py
Original file line number Diff line number Diff line change
@@ -407,7 +407,7 @@ def _coerce_binop(self, op, left, right):
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}",

0 comments on commit 770dda6

Please sign in to comment.