ded / klass

a utility for creating expressive classes in JavaScript
753 stars 78 forks source link

Inheriting a method #2

Closed henryqdineen closed 13 years ago

henryqdineen commented 13 years ago

In the code below I expect the instance variable to have a "someMethod" method. Am I doing something wrong? Thanks

var BaseKlass = klass(function() {}).methods({  
    someMethod: function() {}
});

var SubKlass = BaseKlass.extend(function() {});

var instance = new SubKlass();
ded commented 13 years ago

verified that it's a bug. thanks for catching this.

ded commented 13 years ago

i went ahead and created a test case for this so that we can begin looking at a fix for this. https://github.com/polvero/klass/blob/master/test/tests.js#L252

ded commented 13 years ago

fixed https://github.com/polvero/klass/commit/ef990ba66455871efb674899558931b84293713b