From fa40d8f98b0fe9969553fe128fc82c38b43d7af1 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Thu, 28 Sep 2006 21:52:20 +0000 Subject: [PATCH] Fix #1508327 - Overloaded methods are hidden when using -fvirtual optimisation git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9375 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/Modules/allocate.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/Modules/allocate.cxx b/Source/Modules/allocate.cxx index 3b471bcd2..b6bdca6ac 100644 --- a/Source/Modules/allocate.cxx +++ b/Source/Modules/allocate.cxx @@ -216,7 +216,11 @@ class Allocate : public Dispatcher { if (virtual_elimination_mode) if (both_have_public_access) if (!is_non_public_base(inclass, b)) - SetFlag(n,"feature:ignore"); + 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"); + } } else { // Some languages need to know about covariant return types Setattr(n, "covariant", most_base_covariant_type);