tc39 / proposal-class-fields

Orthogonally-informed combination of public and private fields proposals
https://arai-a.github.io/ecma262-compare/?pr=1668
1.72k stars 113 forks source link

Unused `privateName` in spec #290

Closed legendecas closed 4 years ago

legendecas commented 4 years ago

https://tc39.es/proposal-class-fields/#runtime-semantics-class-definition-evaluation

Step 2.12.2.8.a.ii created a privateName yet is not used afterwards. It may be used at 2.12.2.8.a.iii since the step is Perform ! classPrivateEnvRec.InitializeBinding(dn, dn)., in which InitializeBinding might accept the name and an initializer, but in the spec two identical dn are used.

littledan commented 4 years ago

Good catch. This should be InitializeBinding(dn, privateName).

Is anyone interested in making a PR to correct the typo?

ljharb commented 4 years ago

I can't find this error in any of the three spec PRs (https://github.com/tc39/ecma262/pull/1655, https://github.com/tc39/ecma262/pull/1667, https://github.com/tc39/ecma262/pull/1668); perhaps it's been fixed in those already?

legendecas commented 4 years ago

I can't find this error in any of the three spec PRs (tc39/ecma262#1655, tc39/ecma262#1667, tc39/ecma262#1668); perhaps it's been fixed in those already?

IIUC this proposal has not been merged into ecma262 yet.

legendecas commented 4 years ago

I can't find this error in any of the three spec PRs (tc39/ecma262#1655, tc39/ecma262#1667, tc39/ecma262#1668); perhaps it's been fixed in those already?

Step 2.12.2.8.a.ii and 2.12.2.8.a.iii are missing in https://github.com/tc39/ecma262/pull/1655 yet presented in https://tc39.es/proposal-class-fields/#runtime-semantics-class-definition-evaluation.

ljharb commented 4 years ago

@legendecas they haven’t been merged, but those three open PRs represent what will be merged eventually. If there’s something missing, please comment on it with specifics :-)