diff options
-rw-r--r-- | src/embind/embind.js | 5 | ||||
-rw-r--r-- | tests/embind/embind.test.js | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/embind/embind.js b/src/embind/embind.js index 57178810..fe784001 100644 --- a/src/embind/embind.js +++ b/src/embind/embind.js @@ -1735,9 +1735,12 @@ function __embind_create_inheriting_constructor(constructorName, wrapperType) { wrapperType = requireRegisteredType(wrapperType, 'wrapper'); var registeredClass = wrapperType.registeredClass; var wrapperPrototype = registeredClass.instancePrototype; + var baseConstructor = registeredClass.baseClass.constructor; var ctor = createNamedFunction(constructorName, function() { - return new registeredClass.baseClass.constructor.implement(this); + var inner = baseConstructor.implement(this); + this.$$ = inner.$$; }); + ctor.prototype = Object.create(wrapperPrototype); return __emval_register(ctor); } diff --git a/tests/embind/embind.test.js b/tests/embind/embind.test.js index f2e2b348..17abccbf 100644 --- a/tests/embind/embind.test.js +++ b/tests/embind/embind.test.js @@ -1707,6 +1707,7 @@ module({ instance.delete(); assert.equal("optionaljs_optional_123", result); }); +*/ test("instanceof", function() { var instance = new Empty; @@ -1714,7 +1715,6 @@ module({ assert.instanceof(instance, cm.AbstractClass); instance.delete(); }); -*/ }); BaseFixture.extend("registration order", function() { |