瀏覽代碼

LibWeb/IDL: Make inner type of typedef inherit nullable attribute

Luke Wilde 3 年之前
父節點
當前提交
a9a9614b6b
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLParser.cpp

+ 2 - 0
Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator/IDLParser.cpp

@@ -809,7 +809,9 @@ void resolve_typedef(Interface& interface, NonnullRefPtr<Type>& type, HashMap<St
     auto it = interface.typedefs.find(type->name);
     auto it = interface.typedefs.find(type->name);
     if (it == interface.typedefs.end())
     if (it == interface.typedefs.end())
         return;
         return;
+    bool is_nullable = type->nullable;
     type = it->value.type;
     type = it->value.type;
+    type->nullable = is_nullable;
     if (!extended_attributes)
     if (!extended_attributes)
         return;
         return;
     for (auto& attribute : it->value.extended_attributes)
     for (auto& attribute : it->value.extended_attributes)