Fix #1508327 - Overloaded methods are hidden when using -fvirtual optimisation

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9375 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2006-09-28 21:52:20 +00:00
commit b80933a6d0

View file

@ -216,7 +216,11 @@ class Allocate : public Dispatcher {
if (virtual_elimination_mode) if (virtual_elimination_mode)
if (both_have_public_access) if (both_have_public_access)
if (!is_non_public_base(inclass, b)) if (!is_non_public_base(inclass, b))
if (!Swig_symbol_isoverloaded(n)) {
// Don't eliminate if an overloaded method as this hides the method
// in the scripting languages: the dispatch function will hide the base method if ignored.
SetFlag(n,"feature:ignore"); SetFlag(n,"feature:ignore");
}
} else { } else {
// Some languages need to know about covariant return types // Some languages need to know about covariant return types
Setattr(n, "covariant", most_base_covariant_type); Setattr(n, "covariant", most_base_covariant_type);