Extending example module class
VelvetyWhite opened this issue · comments
VelvetyWhite commented
In you example, you register a C++ class like so:
module.class_<MyClass>("MyClass")
.constructor<>()
.constructor<std::vector<int>>("MyClassA")
.fun<&MyClass::member_variable>("member_variable")
.fun<&MyClass::member_function>("member_function");
and then you import the module in JS. I tried to extend this class with a small test script
class test extends my.MyClass {
constructor() {
super();
console.log('test.constructor');
}
};
but i get TypeError: parent prototype must be an object or null
.
Is this the expected behavior and I can't extend c++ module registered classes or is it a bug?
Thanks
ic319 commented
Seems to be working just fine now. Thank you