Skip to content

Commit

Permalink
Normative: Apply chain rule to IsFunctionDefinition UnaryExpression: …
Browse files Browse the repository at this point in the history
…UpdateExpression (#706)

Since a *FunctionExpression* is a *PrimaryExpression*, I believe
returning `false` in `IsFunctionDefinition` for every production of
*UnaryExpression* is incorrect. It's also not consistent with the rules for
every other expression.

Otherwise I think `IsFunctionDefinition` would return `false` when
evaluating initializers (e.g. `function foo(bar=function(){}) {}`),
after "unrolling" all production rules.
  • Loading branch information
fkling authored and bterlson committed Nov 2, 2016
1 parent 3c100c8 commit 91e5339
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -12254,7 +12254,6 @@ <h1>Static Semantics: IsFunctionDefinition</h1>
<emu-see-also-para op="IsFunctionDefinition"></emu-see-also-para>
<emu-grammar>
UnaryExpression :
UpdateExpression
`delete` UnaryExpression
`void` UnaryExpression
`typeof` UnaryExpression
Expand Down

0 comments on commit 91e5339

Please sign in to comment.