]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Add pedantic type-argument warning wip/listmodel
authorRico Tzschichholz <ricotz@ubuntu.com>
Tue, 11 Apr 2023 11:41:48 +0000 (13:41 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 17 Apr 2023 19:02:56 +0000 (21:02 +0200)
vala/valadatatype.vala

index d75eee62a48b97df5c009024ef4fb36a56acb095..aa1df9e517f97bb5cfbbf45bdb351215e8ab0a3d 100644 (file)
@@ -707,6 +707,8 @@ public abstract class Vala.DataType : CodeNode {
                        error = true;
                        Report.error (source_reference, "too many type arguments for `%s'", type_symbol.to_string ());
                        return false;
+               } else if (context.pedantic && n_type_args < expected_n_type_args) {
+                       Report.warning (source_reference, "too few type arguments for `%s'", type_symbol.to_string ());
                }
 
                foreach (DataType type in get_type_arguments ()) {