Skip to content

class extends null is broken by ECMAScript #98

Description

@shinenelson

class extends null was reverted by ECMAScript in tc39/ecma262#781 ( tc39/ecma262@c57ef95 ) and is still broken.

The kata is abnormal since it doesn't have a solution in the test itself.
So, the question is whether we should have that test for class extends null?

However, I found a possible solution thanks to devdocs.io ( which had a previous version of the MDN Web Docs; revision ) :

class NullClass extends null {}
assert.equal(Object.getPrototypeOf(NullClass), Function.prototype);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions