Skip to content

Commit

Permalink
Various follow-up fixes to whatwg#180.
Browse files Browse the repository at this point in the history
Fix distinguishable algorithm. Closes whatwg#190.
Fix record handling in various algorithms. Closes whatwg#191, closes whatwg#189.
  • Loading branch information
tobie committed Oct 17, 2016
1 parent 1814384 commit 7448c6c
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 101 deletions.
15 changes: 7 additions & 8 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3253,7 +3253,7 @@ extended attribute’s [=takes a named argument list|named argument list=].
</div>

Two types are <dfn id="dfn-distinguishable" export>distinguishable</dfn> if
at most one of the two [=includes a nullable type=]
at most one of the two [=includes a nullable type=], is a [=dictionary type=], or a [=record type=],
and at least one of the following three conditions is true:

1. The two types (taking their [=inner types=]
Expand Down Expand Up @@ -7758,12 +7758,11 @@ represented by ECMAScript values that correspond to the union’s
1. Let |types| be the [=flattened member types=]
of the [=union type=].
1. If |V| is <emu-val>null</emu-val> or
<emu-val>undefined</emu-val>, and
|types| includes a
[=dictionary type=], then return the
result of
[=converted to an IDL value|converting=]
|V| to that dictionary type.
<emu-val>undefined</emu-val>, then:
1. If |types| includes a [=dictionary type=], then return the
result of [=converted to an IDL value|converting=] |V| to that dictionary type.
1. If |types| includes a [=record type=], then return the
result of [=converted to an IDL value|converting=] |V| to that record type.
1. If |V| is a [=platform object=], then:
1. If |types| includes an [=interface type=] that |V|
implements, then return the IDL value that is a reference to the object |V|.
Expand Down Expand Up @@ -9990,7 +9989,7 @@ and a list of IDL values or the special value “missing”. The algorithm beha
* a [=record type=]
* a [=union type=] that
[=includes a nullable type=] or that
has a [=dictionary type=] in its [=flattened member types|flattened members=]
has a [=dictionary type=] or a [=record type=] in its [=flattened member types|flattened members=]

then remove from |S| all other entries.

Expand Down

0 comments on commit 7448c6c

Please sign in to comment.