summaryrefslogtreecommitdiff
path: root/Examples/test-suite/inherit.i
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/inherit.i')
-rw-r--r--Examples/test-suite/inherit.i19
1 files changed, 19 insertions, 0 deletions
diff --git a/Examples/test-suite/inherit.i b/Examples/test-suite/inherit.i
new file mode 100644
index 0000000..e4eee23
--- /dev/null
+++ b/Examples/test-suite/inherit.i
@@ -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 {};
+
+%}