Allow undefined variants in IDL unions (#37042)

Testing: Includes a test which ensures that unions with a `undefined`
variant compile
Fixes https://github.com/servo/servo/issues/28679
Part of https://github.com/servo/servo/issues/30287

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2025-05-23 18:16:22 +02:00 committed by GitHub
parent 9c0c1cf30f
commit fcc391d852
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 37 additions and 10 deletions

View file

@ -627,3 +627,6 @@ dictionary NotUsedAnyWhereElse {};
dictionary RecordFieldWithUnionInside {
record<USVString, (USVString or NotUsedAnyWhereElse)> recordWithUnionField;
};
// https://github.com/servo/servo/issues/28679
typedef (USVString or undefined) UnionWithUndefinedVariant;