mirror of
https://github.com/servo/servo
synced 2026-04-28 10:27:40 +02:00
Properly generate typedef identities in unions
This commit is contained in:
@@ -2491,10 +2491,18 @@ class IDLUnionType(IDLType):
|
||||
return type.name
|
||||
|
||||
for (i, type) in enumerate(self.memberTypes):
|
||||
if not type.isComplete():
|
||||
# Exclude typedefs because if given "typedef (B or C) test",
|
||||
# we want AOrTest, not AOrBOrC
|
||||
if not type.isComplete() and not isinstance(type, IDLTypedefType):
|
||||
self.memberTypes[i] = type.complete(scope)
|
||||
|
||||
self.name = "Or".join(typeName(type) for type in self.memberTypes)
|
||||
|
||||
# We do this again to complete the typedef types
|
||||
for (i, type) in enumerate(self.memberTypes):
|
||||
if not type.isComplete():
|
||||
self.memberTypes[i] = type.complete(scope)
|
||||
|
||||
self.flatMemberTypes = list(self.memberTypes)
|
||||
i = 0
|
||||
while i < len(self.flatMemberTypes):
|
||||
|
||||
Reference in New Issue
Block a user