Skip to content

Commit

Permalink
Editorial: Remove unused steps from definitions of Contains (tc39#1519)
Browse files Browse the repository at this point in the history
... specifically, steps of the form:
  If _symbol_ is an |Identifier| and StringValue of _symbol_
  is the same value as the StringValue of |IdentifierName|,
  return *true*.

Resolves issue tc39#831.

As @allenwb points out, the intended use case for such steps
does not occur in the spec.

And as I point out, these steps are semantically problematic.

If the intended use case ever *does* occur,
I'm guessing we'll find a different way to handle it.
  • Loading branch information
jmdyck authored and ljharb committed May 29, 2020
1 parent 32fe1a6 commit 5e33f80
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -12793,7 +12793,6 @@ <h1>Static Semantics: Contains</h1>
<emu-grammar>LiteralPropertyName : IdentifierName</emu-grammar>
<emu-alg>
1. If _symbol_ is a |ReservedWord|, return *false*.
1. If _symbol_ is an |Identifier| and StringValue of _symbol_ is the same value as the StringValue of |IdentifierName|, return *true*.
1. Return *false*.
</emu-alg>
</emu-clause>
Expand Down Expand Up @@ -13473,21 +13472,18 @@ <h1>Static Semantics: Contains</h1>
<emu-alg>
1. If |MemberExpression| Contains _symbol_ is *true*, return *true*.
1. If _symbol_ is a |ReservedWord|, return *false*.
1. If _symbol_ is an |Identifier| and StringValue of _symbol_ is the same value as the StringValue of |IdentifierName|, return *true*.
1. Return *false*.
</emu-alg>
<emu-grammar>SuperProperty : `super` `.` IdentifierName</emu-grammar>
<emu-alg>
1. If _symbol_ is the |ReservedWord| `super`, return *true*.
1. If _symbol_ is a |ReservedWord|, return *false*.
1. If _symbol_ is an |Identifier| and StringValue of _symbol_ is the same value as the StringValue of |IdentifierName|, return *true*.
1. Return *false*.
</emu-alg>
<emu-grammar>CallExpression : CallExpression `.` IdentifierName</emu-grammar>
<emu-alg>
1. If |CallExpression| Contains _symbol_ is *true*, return *true*.
1. If _symbol_ is a |ReservedWord|, return *false*.
1. If _symbol_ is an |Identifier| and StringValue of _symbol_ is the same value as the StringValue of |IdentifierName|, return *true*.
1. Return *false*.
</emu-alg>
<emu-grammar>OptionalChain : `?.` IdentifierName</emu-grammar>
Expand Down

0 comments on commit 5e33f80

Please sign in to comment.