Hi Eugene. I'm actually starting to experiment with DCL6 now. I did discover one bug (so far), that mixins "break the inheritance" of static methods.
For example, this (vanilla ES6) demonstrates how subclasses inherit static methods from their superclass:
class A {
static foo () { console.log("hello world"); }
}
class B extends A {
}
B.foo();
And this also works:
const BWithDcl = dcl(A, Base => class extends Base {} );
BWithDcl.foo();
However, when a mixin is involved, it stops working, and the subclass has no foo() static method:
const Mixin = dcl(null, Base => class extends Base {} );
const BWithDclWithMixin = dcl(A, Mixin, Base => class extends Base {} );
BWithDclWithMixin.foo();
Thank you for the bug report and the repro case. When I wrote dcl6 static methods were not formalized yet, so this is one of less tested features. (The other one is built-in classes).
Hi Eugene. I'm actually starting to experiment with DCL6 now. I did discover one bug (so far), that mixins "break the inheritance" of static methods.
For example, this (vanilla ES6) demonstrates how subclasses inherit static methods from their superclass:
And this also works:
However, when a mixin is involved, it stops working, and the subclass has no
foo()
static method: