From e8bba0a7d6cd425598b645575c20cdd210cdaa44 Mon Sep 17 00:00:00 2001 From: whitequark Date: Tue, 5 Jan 2016 04:21:46 +0000 Subject: [PATCH] Commit missing parts of 6a6d7d. --- artiq/compiler/transforms/inferencer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artiq/compiler/transforms/inferencer.py b/artiq/compiler/transforms/inferencer.py index 07ee75198..e2f9b5efd 100644 --- a/artiq/compiler/transforms/inferencer.py +++ b/artiq/compiler/transforms/inferencer.py @@ -1061,7 +1061,7 @@ class Inferencer(algorithm.Visitor): node.optional_vars.loc, node.context_expr.loc, makenotes=makenotes) - else: + elif not types.is_var(typ): diag = diagnostic.Diagnostic("error", "value of type {type} cannot act as a context manager", {"type": types.TypePrinter().name(typ)},