mirror of
https://github.com/servo/servo.git
synced 2025-08-02 12:10:29 +01:00
Properly generate typedef identities in unions
This commit is contained in:
parent
3631e314b9
commit
3976d974fc
4 changed files with 23 additions and 6 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue