Skip to content

Commit

Permalink
adjust validation text
Browse files Browse the repository at this point in the history
  • Loading branch information
yaacovCR committed Apr 6, 2022
1 parent 1f0f1e0 commit 2b42f6b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions spec/Section 3 -- Type System.md
Original file line number Diff line number Diff line change
Expand Up @@ -1437,12 +1437,17 @@ Union types have the potential to be invalid if incorrectly defined.
wrapping types must not be member types of a Union.
3. A union type may declare that it implements one or more unique interfaces.
4. Each member of a union must be a super-set of all union-implemented
interfaces:
interfaces. Moreover, each union member must declare that it implements each
interface declared on the union:
1. Let this union type be {implementingType}.
2. For each member type of {implementingType}:
1. Let this member type be {memberType}.
2. For each interface declared implemented as {implementedType},
{IsValidImplementation(memberType, implementedType)} must be {true}.
2. For each interface declared implemented by {implementingType}.
1. Let the implemented type be {implementedType}.
2. {IsValidImplementation(memberType, implementedType)} must be {true}.
3. Let the set of types declared as implemented by {memberType} be
{memberImplementedTypes}.
4. {memberImplementedTypes} must contain {implementedType}.

### Union Extensions

Expand Down Expand Up @@ -1470,7 +1475,8 @@ Union type extensions have the potential to be invalid if incorrectly defined.
5. Any non-repeatable directives provided must not already apply to the original
Union type.
6. All member types of the resulting extended Union type must be a super-set of
all Interfaces it implements.
all Interfaces it implements. Moreover, each union member must declare that
it implements each interface that declared on the union.

## Enums

Expand Down

0 comments on commit 2b42f6b

Please sign in to comment.