Skip to content

Add tests for setting class-name in ClassDefinitionEvaluation#2057

Merged
leobalter merged 1 commit intotc39:masterfrom
anba:anonymous-fn-name
Jan 30, 2019
Merged

Add tests for setting class-name in ClassDefinitionEvaluation#2057
leobalter merged 1 commit intotc39:masterfrom
anba:anonymous-fn-name

Conversation

@anba
Copy link
Contributor

@anba anba commented Jan 30, 2019

  • Updates three existing tests now that "name" is added directly after "prototype".
  • Adds new tests for the case which motivated the spec change.

Spec PR: tc39/ecma262#1372

@leobalter leobalter merged commit 3efcde4 into tc39:master Jan 30, 2019
@anba anba deleted the anonymous-fn-name branch June 25, 2020 08:58
TimothyGu added a commit to TimothyGu/test262 that referenced this pull request Jun 20, 2021
Since tc39/ecma262#1490, the "length" and "name"
properties of a class are defined before any static methods. This is
tested by tc39#2057, in test/language/computed-property-names of all places.

At the same time, static methods with "name" as the name would overwrite
the original property, but retain the original property enumeration
order. This was not previously tested. In fact, the overwriting behavior
was not tested at all for the "length" property.

This commit mends both holes in test coverage.
TimothyGu added a commit to TimothyGu/test262 that referenced this pull request Jun 20, 2021
Since tc39/ecma262#1490, the "length" and "name"
properties of a class are defined before any static methods. This is
tested by tc39#2057, in test/language/computed-property-names of all places.

At the same time, static methods with "name" as the name would overwrite
the original property, but retain the original property enumeration
order. This was not previously tested. In fact, the overwriting behavior
was not tested at all for the "length" property.

This commit mends both holes in test coverage.
TimothyGu added a commit to TimothyGu/test262 that referenced this pull request Jul 2, 2021
Since tc39/ecma262#1490, the "length" and "name"
properties of a class are defined before any static methods. This is
tested by tc39#2057, in test/language/computed-property-names of all places.

At the same time, static methods with "name" as the name would overwrite
the original property, but retain the original property enumeration
order. This was not previously tested. In fact, the overwriting behavior
was not tested at all for the "length" property.

This commit mends both holes in test coverage.
rwaldron pushed a commit that referenced this pull request Jul 16, 2021
Since tc39/ecma262#1490, the "length" and "name"
properties of a class are defined before any static methods. This is
tested by #2057, in test/language/computed-property-names of all places.

At the same time, static methods with "name" as the name would overwrite
the original property, but retain the original property enumeration
order. This was not previously tested. In fact, the overwriting behavior
was not tested at all for the "length" property.

This commit mends both holes in test coverage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants