Skip to content

Conversation

dead-claudia
Copy link

Addresses #43

@lukehoban
Copy link
Owner

As noted in #43, I'm not sure this is the right change to address this - I'd like to include the details on how subclassing of builtins will be handled in ES6, but that section of the spec is still being finalized as we speak.

@dead-claudia
Copy link
Author

@lukehoban ping...

This does appear to be handled at this point. Subclassing works like this:

class A {
  constructor() {
    this.foo = 2; // okay
  }
}

class B extends A {
  constructor() {
    // this.bar = baz; // ReferenceError (TDZ)
    super();
    this.baz = 2; // okay
  }
}

This is currently how subclassing is handled AFAIK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants