Commit da26b4a2 authored by Stefan Behnel's avatar Stefan Behnel

ALways mark the entry of generator expression functions as used. Because, why...

ALways mark the entry of generator expression functions as used. Because, why not, they probably are. And it avoids false warnings.
Fixes https://github.com/cython/cython/issues/1699
parent be3b1782
......@@ -4156,6 +4156,10 @@ class GeneratorBodyDefNode(DefNode):
cname=cname, visibility='private')
entry.func_cname = cname
entry.qualified_name = EncodedString(self.name)
# Work-around for https://github.com/cython/cython/issues/1699
# We don't currently determine whether the generator entry is used or not,
# so mark it as used to avoid false warnings.
entry.used = True
self.entry = entry
def analyse_declarations(self, env):
......
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