Commit 4b582294 authored by Robert Bradshaw's avatar Robert Bradshaw

Don't error on inherited type members.

This fixes #1788.
parent 18bba8ff
...@@ -434,6 +434,9 @@ class Scope(object): ...@@ -434,6 +434,9 @@ class Scope(object):
if self.is_cpp_class_scope and type.is_cfunction and old_type.is_cfunction and type != old_type: if self.is_cpp_class_scope and type.is_cfunction and old_type.is_cfunction and type != old_type:
# C++ method overrides are ok # C++ method overrides are ok
pass pass
elif self.is_cpp_class_scope and entries[name].is_inherited:
# Likewise ignore inherited classes.
pass
elif visibility == 'extern': elif visibility == 'extern':
warning(pos, "'%s' redeclared " % name, 0) warning(pos, "'%s' redeclared " % name, 0)
elif visibility != 'ignore': elif visibility != 'ignore':
......
...@@ -210,3 +210,11 @@ def test_insert(): ...@@ -210,3 +210,11 @@ def test_insert():
assert v.size() == count assert v.size() == count
for element in v: for element in v:
assert element == value, '%s != %s' % (element, count) assert element == value, '%s != %s' % (element, count)
# Tests GitHub issue #1788.
cdef cppclass MyVector[T](vector):
pass
cdef cppclass Ints(MyVector[int]):
pass
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