mirror of https://github.com/m-labs/artiq.git
Commit missing parts of 6a6d7d.
This commit is contained in:
parent
6a6d7dab19
commit
e8bba0a7d6
|
@ -1061,7 +1061,7 @@ class Inferencer(algorithm.Visitor):
|
||||||
node.optional_vars.loc, node.context_expr.loc,
|
node.optional_vars.loc, node.context_expr.loc,
|
||||||
makenotes=makenotes)
|
makenotes=makenotes)
|
||||||
|
|
||||||
else:
|
elif not types.is_var(typ):
|
||||||
diag = diagnostic.Diagnostic("error",
|
diag = diagnostic.Diagnostic("error",
|
||||||
"value of type {type} cannot act as a context manager",
|
"value of type {type} cannot act as a context manager",
|
||||||
{"type": types.TypePrinter().name(typ)},
|
{"type": types.TypePrinter().name(typ)},
|
||||||
|
|
Loading…
Reference in New Issue