]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: length-type of arrays must not be nullable (2)
authorRico Tzschichholz <ricotz@ubuntu.com>
Tue, 20 Apr 2021 12:05:55 +0000 (14:05 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Tue, 20 Apr 2021 12:05:55 +0000 (14:05 +0200)
vala/valaarraycreationexpression.vala

index 2cdd3bbf04bdc4f9ce6bd10bc5b81f3d92ee7a70..70fc4425a95e86e8e2a3a1c23220b5e8f4bb2a40 100644 (file)
@@ -258,7 +258,7 @@ public class Vala.ArrayCreationExpression : Expression {
                        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");
                        }