Commit 8cbdb269 authored by Jeroen Demeyer's avatar Jeroen Demeyer

Treat entries with constant type as constant

parent 20ff6c2a
...@@ -2074,7 +2074,11 @@ class NameNode(AtomicExprNode): ...@@ -2074,7 +2074,11 @@ class NameNode(AtomicExprNode):
def check_const(self): def check_const(self):
entry = self.entry entry = self.entry
if entry is not None and not (entry.is_const or entry.is_cfunction or entry.is_builtin): if entry is not None and not (
entry.is_const or
entry.is_cfunction or
entry.is_builtin or
entry.type.is_const):
self.not_const() self.not_const()
return False return False
return True return True
......
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