@@ -3676,16 +3676,26 @@ MergeEnumTypes(enums):
3676
3676
{firstEnum }, and enum values of {firstEnum } excluding any marked with
3677
3677
`@inaccessible `.
3678
3678
- Let {typeName } be the name of {firstEnum }.
3679
- - Let {description } be the description of { firstEnum }.
3680
- - Let {enumValues } be the set of all enum values in { enums } .
3681
- - For each { enum } in {enums }:
3682
- - If { description } is { null }:
3683
- - Set { description } to the description of { enum }.
3684
- - For each { enumValue } in the enum values of {enum }:
3685
- - If {enumValue } is marked with ` @inaccessible `
3686
- - Remove { enumValue } from { enumValues }.
3679
+ - Let {description } be the first non empty description of any { enum } in { enums }.
3680
+ - Let {mergedValues } be an empty set .
3681
+ - Let { valueNames } be the set of all enum value names in {enums }.
3682
+ - For each { valueName } in { valueNames }:
3683
+ - Let { values } be the set of enum values with the name { valueName } in { enums }.
3684
+ - Let { mergedValue } be the result of {MergeEnumValues (values)}.
3685
+ - If {mergedValue } is not { null }:
3686
+ - Add { mergedValue } to { mergedValues }.
3687
3687
- Return a new enum type with the name of {typeName }, description of
3688
- {description }, and enum values of {enumValues }.
3688
+ {description }, and enum values of {mergedValue }.
3689
+
3690
+ MergeEnumValues (enumValues):
3691
+
3692
+ - If any {enumValue } in {enumValues } is marked with `@inaccessible `
3693
+ - Return {null }
3694
+ - Let {name } be the name of the first {enumValue } in {enumValues }.
3695
+ - Let {description } be the first non empty description of any {enumValue } in
3696
+ {enumValues }.
3697
+ - Return a new enum value with the name of {name } and description of
3698
+ {description }.
3689
3699
3690
3700
**Explanatory Text **
3691
3701
0 commit comments