Skip to content

Commit

Permalink
Make callbacks and dictionary-like distinguishable
Browse files Browse the repository at this point in the history
Fixes #1191.
  • Loading branch information
vmpstr authored Jan 15, 2024
1 parent 003dd03 commit 857ba61
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3467,7 +3467,7 @@ the following algorithm returns <i>true</i>.
<td class="belowdiagonal">
<td class="belowdiagonal">
<td>
<td>
<td>(c)
<td>●
<tr>
<th>dictionary-like
Expand Down Expand Up @@ -3505,6 +3505,16 @@ the following algorithm returns <i>true</i>.
<a href="#limit-bigint-numeric-overloading">a separate restriction on their use in
overloading</a> below. Please also note <a href="#limit-bigint-numeric-unions">the
advice about using unions of these types</a>.
1. A [=callback function=] that does not have
[{{LegacyTreatNonObjectAsNull}}] extended attribute is
distinguishable from a type in the dictionary-like category.
<div class="note">
For example, when converting an ECMAScript value to [=union
type=] which includes a [=callback function=] and a
dictionary-like type, if the value is [=ECMAScript/callable=],
then it is converted to a [=callback function=]. Otherwise, it is
converted to a dictionary-like type.
</div>
</ol>

<div class="example" id="example-distinguishability-diff-types">
Expand Down

0 comments on commit 857ba61

Please sign in to comment.