@@ -1437,12 +1437,17 @@ Union types have the potential to be invalid if incorrectly defined.
1437
1437
wrapping types must not be member types of a Union .
1438
1438
3. A union type may declare that it implements one or more unique interfaces .
1439
1439
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 :
1441
1442
1. Let this union type be {implementingType }.
1442
1443
2. For each member type of {implementingType }:
1443
1444
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 }.
1446
1451
1447
1452
### Union Extensions
1448
1453
@@ -1470,7 +1475,8 @@ Union type extensions have the potential to be invalid if incorrectly defined.
1470
1475
5. Any non -repeatable directives provided must not already apply to the original
1471
1476
Union type .
1472
1477
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 .
1474
1480
1475
1481
## Enums
1476
1482
0 commit comments