mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Support using typedefs with nullable unions.
This commit is contained in:
parent
8ca1383c41
commit
35bc171a05
2 changed files with 3 additions and 1 deletions
|
@ -6122,7 +6122,8 @@ class CGBindingRoot(CGThing):
|
|||
|
||||
# Do codegen for all the typdefs
|
||||
for t in typedefs:
|
||||
if t.innerType.isUnion():
|
||||
if t.innerType.isUnion() and not t.innerType.nullable():
|
||||
# Allow using the typedef's name for accessing variants.
|
||||
cgthings.extend([CGGeneric("\npub use dom::bindings::codegen::UnionTypes::%s as %s;\n\n" %
|
||||
(t.innerType, t.identifier.name))])
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue