tc39 / proposal-grouped-and-auto-accessors

Grouped Accessors and Auto-Accessors for ECMAScript
https://tc39.es/proposal-grouped-and-auto-accessors
MIT License
54 stars 5 forks source link

Does the computed grouped accessor name evaulate once or twice? #3

Closed MadProbe closed 3 years ago

MadProbe commented 3 years ago
let calls = 0;
class C {
    [calls++] { get; set }
}
console.log(calls); // 1 or 2?
ljharb commented 3 years ago

calls++ appears only once in the code, so I would hope it's 1.