From 2e1d6f624d38b6ee008f5c3902e8fef03f106deb Mon Sep 17 00:00:00 2001 From: Bastiaan van der Plaat Date: Sun, 20 Aug 2023 21:46:37 +0200 Subject: [PATCH] LibIDL: Fix bug where Type::is_json doesn't look at parent interface --- Userland/Libraries/LibIDL/Types.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibIDL/Types.cpp b/Userland/Libraries/LibIDL/Types.cpp index bc568b1ddf..564f32c176 100644 --- a/Userland/Libraries/LibIDL/Types.cpp +++ b/Userland/Libraries/LibIDL/Types.cpp @@ -277,10 +277,10 @@ bool Type::is_json(Interface const& interface) const if (to_json_iterator != current_interface_for_to_json->functions.end()) return true; - if (interface.parent_name.is_empty()) + if (current_interface_for_to_json->parent_name.is_empty()) break; - auto imported_interface_iterator = interface.imported_modules.find_if([¤t_interface_for_to_json](IDL::Interface const& imported_interface) { + auto imported_interface_iterator = current_interface_for_to_json->imported_modules.find_if([¤t_interface_for_to_json](IDL::Interface const& imported_interface) { return imported_interface.name == current_interface_for_to_json->parent_name; });