archives

« Bugzilla Issues Index

#3304 — name property of anonymous class expression?


Based on my interpretation it seems like there will not be a name property on C in the following example.

var C = class {};
assertFalse(C.hasOwnProperty('name'));

Is this correc. Is this desired?


How did you reach that conclusion?

It should be set by the evaluation action for
VariableDeclaration : BindingIdentifier Initializer

http://people.mozilla.org/~jorendorff/es6-draft.html#sec-variable-statement-runtime-semantics-evaluation step 4.

Do you see something that is cause the name property creation step to be skipped?


Thanks. It is clear now.

IsAnonymousFunctionDefinition was the magic word I didn't find