Skip to content

Commit

Permalink
Editorial: Remove unnecessary undefined type from property descript…
Browse files Browse the repository at this point in the history
…or tests

`Is{Accessor,Data,Generic}Descriptor` are never called with `undefined`.
  • Loading branch information
anba committed Aug 26, 2024
1 parent 6c621d2 commit 31172be
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -4411,13 +4411,12 @@ <h1>The Property Descriptor Specification Type</h1>
<emu-clause id="sec-isaccessordescriptor" type="abstract operation">
<h1>
IsAccessorDescriptor (
_Desc_: a Property Descriptor or *undefined*,
_Desc_: a Property Descriptor,
): a Boolean
</h1>
<dl class="header">
</dl>
<emu-alg>
1. If _Desc_ is *undefined*, return *false*.
1. If _Desc_ has a [[Get]] field, return *true*.
1. If _Desc_ has a [[Set]] field, return *true*.
1. Return *false*.
Expand All @@ -4427,13 +4426,12 @@ <h1>
<emu-clause id="sec-isdatadescriptor" type="abstract operation">
<h1>
IsDataDescriptor (
_Desc_: a Property Descriptor or *undefined*,
_Desc_: a Property Descriptor,
): a Boolean
</h1>
<dl class="header">
</dl>
<emu-alg>
1. If _Desc_ is *undefined*, return *false*.
1. If _Desc_ has a [[Value]] field, return *true*.
1. If _Desc_ has a [[Writable]] field, return *true*.
1. Return *false*.
Expand All @@ -4443,13 +4441,12 @@ <h1>
<emu-clause id="sec-isgenericdescriptor" type="abstract operation">
<h1>
IsGenericDescriptor (
_Desc_: a Property Descriptor or *undefined*,
_Desc_: a Property Descriptor,
): a Boolean
</h1>
<dl class="header">
</dl>
<emu-alg>
1. If _Desc_ is *undefined*, return *false*.
1. If IsAccessorDescriptor(_Desc_) is *true*, return *false*.
1. If IsDataDescriptor(_Desc_) is *true*, return *false*.
1. Return *true*.
Expand Down

0 comments on commit 31172be

Please sign in to comment.