-
• #2
@OP, this probably won't help you directly.
I have done some reading about super lately. Here's a summary:
- functions created with funcName() syntax (as in class { }) have a hidden attribute pointing to their "HomeObject" - C.prototype and B.prototype in the example here.
- also true in an object-literal like { foo() { } }, as a pedantic side note
- also true in an object-literal like { foo() { } }, as a pedantic side note
- super is (should be) Object.prototypeOf(HomeObject)
- in constructor, super() is shorthand for super.constructor()
It looks like the call to super at line 7 may be resolving super as Object.prototypeOf(this) instead.
https://2ality.com/2011/11/super-references.html
HTH someone
- functions created with funcName() syntax (as in class { }) have a hidden attribute pointing to their "HomeObject" - C.prototype and B.prototype in the example here.
-
• #3
Hi - I'm afraid I think you've just hit this bug in Espruino:
Classes cannot extend classes that extend classes #1529
https://github.com/espruino/Espruino/issues/1529
Until it gets fixed there's a workaround mentioned there though
Example:
Result: