Closed jswalden closed 4 years ago
And to be clear, these are two testcases that should hit this omission:
class C66 {
128n = class {};
}
new C66();
and
class C66 {
128 = class {};
}
new C66();
(Possibly the spec does not require the final new
expressions.)
I skimmed too fast -- LiteralPropertyName
evaluates to a string, not to potentially a numeric value.
SpiderMonkey got a bug report about inferred names for bigint fields.
On semi-careful inspection of the spec, it appears that the
SetFunctionName
function to name anonymous functions that are assigned to numeric fields is wrong. Field definition evaluation stores a number or bigint for numeric fields, in the[[Name]]
field. DefineField passes that value unaltered toSetFunctionName
. AndSetFunctionName
asserts the provided name is Symbol, String, or Private Name.Either that, or I skimmed too hard and too fast.
Probably the name-value should be converted to some canonical representation in field definition evaluation? I dunno, I'm not versed in this stuff enough to be sure.