summaryrefslogtreecommitdiff
path: root/Examples/test-suite/director_redefined.i
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/director_redefined.i')
-rw-r--r--Examples/test-suite/director_redefined.i34
1 files changed, 34 insertions, 0 deletions
diff --git a/Examples/test-suite/director_redefined.i b/Examples/test-suite/director_redefined.i
new file mode 100644
index 000000000..79b8bef6e
--- /dev/null
+++ b/Examples/test-suite/director_redefined.i
@@ -0,0 +1,34 @@
+%module(directors="1") director_redefined
+
+ /*
+ This example generates two 'get_val' virtual members in the
+ director, and since they are equivalent, the compilation fails.
+ */
+
+%feature("director") B;
+
+%inline
+{
+ typedef int Int;
+
+ struct A
+ {
+ virtual ~A()
+ {
+ }
+ virtual int get_val(Int a)
+ {
+ return 0;
+ }
+
+ };
+
+ struct B : A
+ {
+ virtual int get_val(int a)
+ {
+ return 1;
+ }
+ };
+}
+