1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:57:35 +00:00

LibIDL+WrapperGenerator: Implement Type::is_distinguishable_from()

As part of this, I've moved a couple of methods for checking for
null/undefined from UnionType to Type, and filled in more of their
steps.

This now detects more, and so causes us to hit a `TODO()` which is too
big for me to go after right now, so I've replaced that assertion with
a log message.
This commit is contained in:
Sam Atkins 2022-09-07 15:27:08 +01:00 committed by Andreas Kling
parent 7c8ef79898
commit 8b4cc07a54
3 changed files with 217 additions and 37 deletions

View file

@ -1019,7 +1019,7 @@ static void generate_to_cpp(SourceGenerator& generator, ParameterType& parameter
// FIXME: 2. If the union type includes a nullable type and V is null or undefined, then return the IDL value null.
if (union_type.includes_nullable_type()) {
TODO();
dbgln("FIXME: 2. If the union type includes a nullable type and V is null or undefined, then return the IDL value null.");
} else if (dictionary_type) {
// 4. If V is null or undefined, then
// 4.1 If types includes a dictionary type, then return the result of converting V to that dictionary type.