T.J. Crowder (2017-01-27T15:26:16.000Z)
tj.crowder at farsightsoftware.com (2017-01-27T15:36:55.898Z)
Two questions on the minor issue of the following not assigning a name to the function: ```js obj.foo = function() { }; ``` 1\) Am I correct that the only reason it doesn't (in spec terms) is that Step 1.e. of [Assignment Operators - Runtime Semantics: Evaluation](https://tc39.github.io/ecma262/#sec-assignment-operators-runtime-semantics-evaluation) reads > If IsAnonymousFunctionDefinition(AssignmentExpression) and IsIdentifierRef of LeftHandSideExpression are both true, then and that changing that to > If IsAnonymousFunctionDefinition(AssignmentExpression) is true and either IsIdentifierRef of LeftHandSideExpression is true or IsPropertyReference of LeftHandSideExpression is true, then would mean it would assign the name `foo`? (The subsequent step getting the name to use already uses GetReferencedName, which works for property references as well as identifier references.) 2\) Are there any objections to closing this gap in how function names are assigned? -- T.J.
tj.crowder at farsightsoftware.com (2017-01-27T15:30:57.934Z)
Two questions on the minor issue of the following not assigning a name to the function: ```js obj.foo = function() { }; ``` 1\) Am I correct that the only reason it doesn't (in spec terms) is that Step 1.e. of [Runtime Semantics: Evaluation](https://tc39.github.io/ecma262/#sec-assignment-operators-runtime-semantics-evaluation) reads > If IsAnonymousFunctionDefinition(AssignmentExpression) and IsIdentifierRef of LeftHandSideExpression are both true, then and that changing that to > If IsAnonymousFunctionDefinition(AssignmentExpression) is true and either IsIdentifierRef of LeftHandSideExpression is true or IsPropertyReference of LeftHandSideExpression is true, then would mean it would assign the name `foo`? (The subsequent step getting the name to use already uses GetReferencedName, which works for property references as well as identifier references.) 2\) Are there any objections to closing this gap in how function names are assigned? -- T.J.