Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tests concerning null-extending classes #658

Merged
merged 2 commits into from Jun 10, 2016

Conversation

jugglinmike
Copy link
Contributor

The latest revision of ECMA262 makes special provisions for classes
which extend the null value [1]. Update the relevant tests
accordingly.

[1] tc39/ecma262#543

@bterlson I believe this fully addresses gh-588. As far as I can tell, there
are two observable difference for that change in the spec:

  • There is no requirement for the constructor to return a value (ES2016
    required a return value in this case, and I've updated the relevant test)
  • this may be referenced from within the constructor (ES2016 does not allow
    such a reference, but we previously had no test for that)

SuperCall continues to be invalid for the same reason. Despite the fact that
there was no change to that behavior, I added a test for good measure.

I'm reasonably confident that there are no lingering tests for the outdated
semantics. (My heuristic is manually inspecting all files that contain the
strings "extends" and "null" but not necessarily on the same line.)

$ grep -E 'extends' test/ -r -l --null | xargs -0 grep null -l

This should resolve gh-588.

The latest revision of ECMA262 makes special provisions for classes
which extend the `null` value [1]. Update the relevant tests
accordingly.

[1] tc39/ecma262#543

class C extends null {
constructor() {
thisVal = this;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's great to have this test and class-definition-null-proto-super.js

@leobalter
Copy link
Member

just a few descriptive content to fix, the tests LGTM.

@jugglinmike
Copy link
Contributor Author

All set!

@leobalter leobalter merged commit dee1526 into tc39:master Jun 10, 2016
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.

Coverage: class extends null & constructor this value
2 participants