Commit 77b766fe authored by Stefan Behnel's avatar Stefan Behnel

Check result of "declare_builtin()" because it might a) not have been found...

Check result of "declare_builtin()" because it might a) not have been found and b) not actually be a builtin. In both cases, it's actually not a literal.
parent 95d7e469
...@@ -1922,7 +1922,7 @@ class NameNode(AtomicExprNode): ...@@ -1922,7 +1922,7 @@ class NameNode(AtomicExprNode):
self.entry = env.lookup(self.name) self.entry = env.lookup(self.name)
if not self.entry: if not self.entry:
self.entry = env.declare_builtin(self.name, self.pos) self.entry = env.declare_builtin(self.name, self.pos)
if Options.cache_builtins: if self.entry and self.entry.is_builtin and Options.cache_builtins:
self.is_literal = True self.is_literal = True
if not self.entry: if not self.entry:
self.type = PyrexTypes.error_type self.type = PyrexTypes.error_type
......
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