resolve issue involving inheritance + def_static + override (fixes #511)

This commit is contained in:
Wenzel Jakob
2016-11-20 05:26:02 +01:00
parent 405f6d1dfd
commit 7c2461eefd
3 changed files with 33 additions and 1 deletions

View File

@@ -260,7 +260,7 @@ protected:
chain = (detail::function_record *) rec_capsule;
/* Never append a method to an overload chain of a parent class;
instead, hide the parent's overloads in this case */
if (chain->class_ != rec->class_)
if (chain->scope != rec->scope)
chain = nullptr;
}
// Don't trigger for things like the default __init__, which are wrapper_descriptors that we are intentionally replacing