Skip to content

Commit

Permalink
Define how undefined is distinguishable, and remove text that handled…
Browse files Browse the repository at this point in the history
… undefined specially. Fixes whatwg#962.
  • Loading branch information
tabatkins committed Mar 11, 2021
1 parent a053246 commit 4a1a921
Showing 1 changed file with 30 additions and 16 deletions.
46 changes: 30 additions & 16 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3608,6 +3608,7 @@ the following algorithm returns <i>true</i>.
<thead>
<tr>
<th class="corner"></th>
<th><div><span>undefined</span></div>
<th><div><span>boolean</span></div>
<th><div><span>numeric types</span></div>
<th><div><span>bigint</span></div>
Expand All @@ -3619,8 +3620,22 @@ the following algorithm returns <i>true</i>.
<th><div><span>dictionary-like</span></div>
<th><div><span>sequence-like</span></div>
</thead>
<tr>
<th>undefined
<td>
<td>●
<td>●
<td>●
<td>●
<td>●
<td>●
<td>●
<td>●
<td>●
<td>●
<tr>
<th>boolean
<td class="belowdiagonal">
<td>
<td>●
<td>●
Expand All @@ -3634,6 +3649,7 @@ the following algorithm returns <i>true</i>.
<tr>
<th>numeric types
<td class="belowdiagonal">
<td class="belowdiagonal">
<td>
<td>
<td>●
Expand All @@ -3647,6 +3663,7 @@ the following algorithm returns <i>true</i>.
<th>bigint
<td class="belowdiagonal">
<td class="belowdiagonal">
<td class="belowdiagonal">
<td>(b)
<td>●
<td>●
Expand All @@ -3660,6 +3677,7 @@ the following algorithm returns <i>true</i>.
<td class="belowdiagonal">
<td class="belowdiagonal">
<td class="belowdiagonal">
<td class="belowdiagonal">
<td>
<td>●
<td>●
Expand All @@ -3673,6 +3691,7 @@ the following algorithm returns <i>true</i>.
<td class="belowdiagonal">
<td class="belowdiagonal">
<td class="belowdiagonal">
<td class="belowdiagonal">
<td>
<td>●
<td>
Expand All @@ -3686,6 +3705,7 @@ the following algorithm returns <i>true</i>.
<td class="belowdiagonal">
<td class="belowdiagonal">
<td class="belowdiagonal">
<td class="belowdiagonal">
<td>
<td>●
<td>●
Expand All @@ -3699,6 +3719,7 @@ the following algorithm returns <i>true</i>.
<td class="belowdiagonal">
<td class="belowdiagonal">
<td class="belowdiagonal">
<td class="belowdiagonal">
<td>(a)
<td>●
<td>●
Expand All @@ -3712,6 +3733,7 @@ the following algorithm returns <i>true</i>.
<td class="belowdiagonal">
<td class="belowdiagonal">
<td class="belowdiagonal">
<td class="belowdiagonal">
<td>
<td>
<td>●
Expand All @@ -3725,6 +3747,7 @@ the following algorithm returns <i>true</i>.
<td class="belowdiagonal">
<td class="belowdiagonal">
<td class="belowdiagonal">
<td class="belowdiagonal">
<td>
<td>●
<tr>
Expand All @@ -3738,6 +3761,7 @@ the following algorithm returns <i>true</i>.
<td class="belowdiagonal">
<td class="belowdiagonal">
<td class="belowdiagonal">
<td class="belowdiagonal">
<td>
</table>

Expand Down Expand Up @@ -7348,8 +7372,7 @@ ECMAScript value type.
to an IDL {{any}} value by running the following algorithm:

1. If |V| is <emu-val>undefined</emu-val>, then
return an {{object}} reference to a special object that represents
the ECMAScript <emu-val>undefined</emu-val> value.
return the unique {{undefined}} IDL value.
1. If |V| is <emu-val>null</emu-val>, then
return the <emu-val>null</emu-val> {{object|object?}} reference.
1. If <a abstract-op>Type</a>(|V|) is Boolean, then
Expand All @@ -7371,15 +7394,10 @@ ECMAScript value type.
</div>

<p id="any-to-es">
An IDL {{any}} value is
[=converted to an ECMAScript value=]
as follows. If the value is an {{object}}
reference to a special object that represents an ECMAScript <emu-val>undefined</emu-val>
value, then it is converted to the ECMAScript
<emu-val>undefined</emu-val> value. Otherwise,
the rules for converting the [=specific type=]
of the IDL {{any}} value
as described in the remainder of this section are performed.
An IDL {{any}} value is [=converted to an ECMAScript value=]
according to the rules for converting
the [=specific type=] of the IDL {{any}} value
as described in the remainder of this section.
</p>


Expand Down Expand Up @@ -8884,11 +8902,7 @@ that correspond to the union’s [=member types=].
<p id="union-to-es">
An IDL union type value is
[=converted to an ECMAScript value=]
as follows. If the value is an {{object}}
reference to a special object that represents an ECMAScript <emu-val>undefined</emu-val>
value, then it is converted to the ECMAScript
<emu-val>undefined</emu-val> value. Otherwise,
the rules for converting the [=specific type=]
according to the rules for converting the [=specific type=]
of the IDL union type value as described in this section ([[#es-type-mapping]]).
</p>

Expand Down

0 comments on commit 4a1a921

Please sign in to comment.