Skip to content

Commit 857ba61

Browse files
authored
Make callbacks and dictionary-like distinguishable
Fixes #1191.
1 parent 003dd03 commit 857ba61

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

index.bs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3467,7 +3467,7 @@ the following algorithm returns <i>true</i>.
34673467
<td class="belowdiagonal">
34683468
<td class="belowdiagonal">
34693469
<td>
3470-
<td>
3470+
<td>(c)
34713471
<td>●
34723472
<tr>
34733473
<th>dictionary-like
@@ -3505,6 +3505,16 @@ the following algorithm returns <i>true</i>.
35053505
<a href="#limit-bigint-numeric-overloading">a separate restriction on their use in
35063506
overloading</a> below. Please also note <a href="#limit-bigint-numeric-unions">the
35073507
advice about using unions of these types</a>.
3508+
1. A [=callback function=] that does not have
3509+
[{{LegacyTreatNonObjectAsNull}}] extended attribute is
3510+
distinguishable from a type in the dictionary-like category.
3511+
<div class="note">
3512+
For example, when converting an ECMAScript value to [=union
3513+
type=] which includes a [=callback function=] and a
3514+
dictionary-like type, if the value is [=ECMAScript/callable=],
3515+
then it is converted to a [=callback function=]. Otherwise, it is
3516+
converted to a dictionary-like type.
3517+
</div>
35083518
</ol>
35093519

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

0 commit comments

Comments
 (0)