Skip to content

Commit 2b42f6b

Browse files
committed
adjust validation text
1 parent 1f0f1e0 commit 2b42f6b

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

spec/Section 3 -- Type System.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,12 +1437,17 @@ Union types have the potential to be invalid if incorrectly defined.
14371437
wrapping types must not be member types of a Union.
14381438
3. A union type may declare that it implements one or more unique interfaces.
14391439
4. Each member of a union must be a super-set of all union-implemented
1440-
interfaces:
1440+
interfaces. Moreover, each union member must declare that it implements each
1441+
interface declared on the union:
14411442
1. Let this union type be {implementingType}.
14421443
2. For each member type of {implementingType}:
14431444
1. Let this member type be {memberType}.
1444-
2. For each interface declared implemented as {implementedType},
1445-
{IsValidImplementation(memberType, implementedType)} must be {true}.
1445+
2. For each interface declared implemented by {implementingType}.
1446+
1. Let the implemented type be {implementedType}.
1447+
2. {IsValidImplementation(memberType, implementedType)} must be {true}.
1448+
3. Let the set of types declared as implemented by {memberType} be
1449+
{memberImplementedTypes}.
1450+
4. {memberImplementedTypes} must contain {implementedType}.
14461451

14471452
### Union Extensions
14481453

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

14751481
## Enums
14761482

0 commit comments

Comments
 (0)