]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Removed irrelevant warnings
authorJCWasmx86 <JCWasmx86@t-online.de>
Mon, 6 Jun 2022 13:26:15 +0000 (15:26 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sat, 29 Apr 2023 19:00:17 +0000 (21:00 +0200)
dbusgen/valadbusvariantmodule.vala

index 611611b06063d3499639f09acde3c43018052555..4fd10fae275b9195316718eb48e5303182d48f59 100644 (file)
@@ -199,18 +199,20 @@ public class Vala.DBusVariantModule {
                        return string_array_type.copy ();
                } else if (type.is_array ()) {
                        var element = type.element ();
-                       // TODO: Box primitive types
-                       // TODO: Warn about arrays in generics
                        if (element.equal (VariantType.DICTIONARY) || element.is_dict_entry ()) {
                                var res = dictionary_type.copy ();
                                var invalid_generic_arg = invalid_generic_type (element.key()) || invalid_generic_type (element.value ());
                                var key = get_variant_type (element.key ());
                                var value = get_variant_type (element.value ());
                                var valid_types = !((key is ArrayType) || (value is ArrayType) || (key is StructValueType) || (value is StructValueType) || invalid_generic_arg);
-                               if (key != null && value != null && valid_types) {
-                                       res.add_type_argument (key);
-                                       res.add_type_argument (value);
-                                       return res;
+                               if (key != null && value != null) {
+                                       if (valid_types) {
+                                               res.add_type_argument (key);
+                                               res.add_type_argument (value);
+                                               return res;
+                                       } else {
+                                               skipped_generation = true;
+                                       }
                                }
                        } else {
                                var element_type = get_variant_type (element);