Test for patch #1116431 Fix non member functions inadvertently being called instead of member functions.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7499 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
60754cbcbe
commit
db84d961e3
3 changed files with 29 additions and 0 deletions
19
Examples/test-suite/inherit.i
Normal file
19
Examples/test-suite/inherit.i
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
// Test that was failing for Perl - the non-member Foo was being called when the member version was intended
|
||||
%module inherit
|
||||
|
||||
%inline %{
|
||||
|
||||
const char* Foo(void) {
|
||||
return "Non-member Foo";
|
||||
}
|
||||
|
||||
class CBase {
|
||||
public:
|
||||
const char* Foo(void) {
|
||||
return "CBase::Foo";
|
||||
}
|
||||
};
|
||||
|
||||
class CDerived : public CBase {};
|
||||
|
||||
%}
|
||||
Loading…
Add table
Add a link
Reference in a new issue