From 94489f91833f1d6181563e7e9165d222ccfc6bfc Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Tue, 20 Oct 2020 01:28:01 +0200 Subject: [PATCH] compiler: Fix inference order issue in multi-dim. subscript This will be caught by the test for an imminent array quoting fix. --- artiq/compiler/transforms/inferencer.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/artiq/compiler/transforms/inferencer.py b/artiq/compiler/transforms/inferencer.py index e2be2c7df..ddbd0bf24 100644 --- a/artiq/compiler/transforms/inferencer.py +++ b/artiq/compiler/transforms/inferencer.py @@ -237,6 +237,8 @@ class Inferencer(algorithm.Visitor): self.generic_visit(node) if isinstance(node.slice, ast.Index): if types.is_tuple(node.slice.value.type): + if types.is_var(node.value.type): + return if not builtins.is_array(node.value.type): diag = diagnostic.Diagnostic( "error",