Commit c6320307 authored by Stefan Behnel's avatar Stefan Behnel

Make sure builtins add their utility code also when they are only being used...

Make sure builtins add their utility code also when they are only being used as names (applies to StopAsyncIteration, for example).
parent 5ea5a0f5
...@@ -2133,6 +2133,8 @@ class NameNode(AtomicExprNode): ...@@ -2133,6 +2133,8 @@ class NameNode(AtomicExprNode):
entry = self.entry entry = self.entry
if entry is None: if entry is None:
return # There was an error earlier return # There was an error earlier
if entry.utility_code:
code.globalstate.use_utility_code(entry.utility_code)
if entry.is_builtin and entry.is_const: if entry.is_builtin and entry.is_const:
return # Lookup already cached return # Lookup already cached
elif entry.is_pyclass_attr: elif entry.is_pyclass_attr:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment