Closed rbuckton closed 3 years ago
This would be a great review to file on https://github.com/tc39/ecma262/pull/1668
Fair point, I was deep in updating the static {}
proposal and just wanted to make sure I captured the discrepancy.
I've moved this to a review comment on the pr.
Per the spec text here: https://arai-a.github.io/ecma262-compare/?pr=1668&id=sec-runtime-semantics-classdefinitionevaluation
According to this algorithm, abrupt completions on steps 33.a. or 34.a. cause the algorithm to return before the execution context's PrivateEnvironment is reset:
The
?
shorthand forReturnIfAbrupt
should not be used here as it short-circuits restoring the PrivateEnvironment. Instead, we should be storing the result, restoring the PrivateEnvironment, and then useReturnIfAbrupt
.