]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: length-type of arrays must not be nullable
authorRico Tzschichholz <ricotz@ubuntu.com>
Thu, 15 Apr 2021 14:49:14 +0000 (16:49 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Thu, 15 Apr 2021 14:49:14 +0000 (16:49 +0200)
vala/valaarraytype.vala

index 2468edf20e003a9bb815569c57ef987d7904f710..85b7b1f45fb33a6d86be4b4c9d27d26caf161233 100644 (file)
@@ -319,7 +319,7 @@ public class Vala.ArrayType : ReferenceType {
                        length_type = context.analyzer.int_type.copy ();
                } else {
                        length_type.check (context);
-                       if (!(length_type is IntegerType)) {
+                       if (!(length_type is IntegerType) || length_type.nullable) {
                                error = true;
                                Report.error (length_type.source_reference, "Expected integer type as length type of array");
                                return false;