Skip to content

Commit ed2c6d9

Browse files
bakkotmathiasbynens
authored andcommitted
Editorial: swap order of arguments to PrivateElementFind (tc39#2504)
1 parent bc56215 commit ed2c6d9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

spec.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6595,8 +6595,8 @@ <h1>
65956595
<emu-clause id="sec-privateelementfind" type="abstract operation">
65966596
<h1>
65976597
PrivateElementFind (
6598-
_P_: a Private Name,
65996598
_O_: an Object,
6599+
_P_: a Private Name,
66006600
)
66016601
</h1>
66026602
<dl class="header">
@@ -6620,7 +6620,7 @@ <h1>
66206620
<dl class="header">
66216621
</dl>
66226622
<emu-alg>
6623-
1. Let _entry_ be ! PrivateElementFind(_P_, _O_).
6623+
1. Let _entry_ be ! PrivateElementFind(_O_, _P_).
66246624
1. If _entry_ is not ~empty~, throw a *TypeError* exception.
66256625
1. Append PrivateElement { [[Key]]: _P_, [[Kind]]: ~field~, [[Value]]: _value_ } to _O_.[[PrivateElements]].
66266626
</emu-alg>
@@ -6637,7 +6637,7 @@ <h1>
66376637
</dl>
66386638
<emu-alg>
66396639
1. Assert: _method_.[[Kind]] is either ~method~ or ~accessor~.
6640-
1. Let _entry_ be ! PrivateElementFind(_method_.[[Key]], _O_).
6640+
1. Let _entry_ be ! PrivateElementFind(_O_, _method_.[[Key]]).
66416641
1. If _entry_ is not ~empty~, throw a *TypeError* exception.
66426642
1. Append _method_ to _O_.[[PrivateElements]].
66436643
1. NOTE: The values for private methods and accessors are shared across instances. This step does not create a new copy of the method or accessor.
@@ -6654,7 +6654,7 @@ <h1>
66546654
<dl class="header">
66556655
</dl>
66566656
<emu-alg>
6657-
1. Let _entry_ be ! PrivateElementFind(_P_, _O_).
6657+
1. Let _entry_ be ! PrivateElementFind(_O_, _P_).
66586658
1. If _entry_ is ~empty~, throw a *TypeError* exception.
66596659
1. If _entry_.[[Kind]] is ~field~ or ~method~, then
66606660
1. Return _entry_.[[Value]].
@@ -6676,7 +6676,7 @@ <h1>
66766676
<dl class="header">
66776677
</dl>
66786678
<emu-alg>
6679-
1. Let _entry_ be ! PrivateElementFind(_P_, _O_).
6679+
1. Let _entry_ be ! PrivateElementFind(_O_, _P_).
66806680
1. If _entry_ is ~empty~, throw a *TypeError* exception.
66816681
1. If _entry_.[[Kind]] is ~field~, then
66826682
1. Set _entry_.[[Value]] to _value_.
@@ -19762,7 +19762,7 @@ <h1>Runtime Semantics: Evaluation</h1>
1976219762
1. If Type(_rval_) is not Object, throw a *TypeError* exception.
1976319763
1. Let _privateEnv_ be the running execution context's PrivateEnvironment.
1976419764
1. Let _privateName_ be ! ResolvePrivateIdentifier(_privateEnv_, _privateIdentifier_).
19765-
1. If ! PrivateElementFind(_privateName_, _rval_) is not ~empty~, return *true*.
19765+
1. If ! PrivateElementFind(_rval_, _privateName_) is not ~empty~, return *true*.
1976619766
1. Return *false*.
1976719767
</emu-alg>
1976819768
</emu-clause>

0 commit comments

Comments
 (0)