Commit 82b3d74b authored by Stefan Behnel's avatar Stefan Behnel

Actually show "redefined" warnings, but only for "cdef extern" blocks, i.e....

Actually show "redefined" warnings, but only for "cdef extern" blocks, i.e. the exact case described in #1874.
Closes #1874.
parent a58d9a3a
......@@ -451,8 +451,9 @@ class Scope(object):
# Likewise ignore inherited classes.
pass
elif visibility == 'extern':
# Silenced, until we have a safer way to prevent pxd-defined cpdef functions from ending up here.
warning(pos, "'%s' redeclared " % name, 0)
# Silenced outside of "cdef extern" blocks, until we have a safe way to
# prevent pxd-defined cpdef functions from ending up here.
warning(pos, "'%s' redeclared " % name, 1 if self.in_cinclude else 0)
elif visibility != 'ignore':
error(pos, "'%s' redeclared " % name)
entry = Entry(name, cname, type, pos = pos)
......
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