aboutsummaryrefslogtreecommitdiff
path: root/tests/webidl/test.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-05-14 13:17:13 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-05-14 13:17:13 -0700
commitd470387f096d6427720a9c8a61776fa3d276683e (patch)
tree83e0d3a798308ca139983a621ad96a19c0ecf60b /tests/webidl/test.h
parentb915f42db8e2b454b8b07e0eb7f8a176fefdc534 (diff)
allow overriding functions with the same name in the parent in webidl binder
Diffstat (limited to 'tests/webidl/test.h')
-rw-r--r--tests/webidl/test.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/webidl/test.h b/tests/webidl/test.h
index 903f8f78..d8eb0fbc 100644
--- a/tests/webidl/test.h
+++ b/tests/webidl/test.h
@@ -10,6 +10,7 @@ public:
Parent(Parent *p, Parent *q); // overload constructor
int getVal() { return value; }; // inline should work just fine here, unlike Way 1 before
void mulVal(int mul);
+ void parentFunc() {}
};
class Child1 : public Parent {
@@ -19,6 +20,7 @@ public:
int getValSqr() { return value*value; }
int getValSqr(int more) { return value*value*more; }
int getValTimes(int times=1) { return value*times; }
+ void parentFunc(int x) { printf("Child1::parentFunc(%d)\n", x); }
};
// Child2 has vtable, parent does not. Checks we cast child->parent properly - (Parent*)child is not a no-op, must offset