From: Rico Tzschichholz Date: Tue, 20 Apr 2021 12:05:55 +0000 (+0200) Subject: vala: length-type of arrays must not be nullable (2) X-Git-Tag: 0.53.1~96 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=145bfaf7be06daedade0048b938ceb29169081f9;p=thirdparty%2Fvala.git vala: length-type of arrays must not be nullable (2) --- diff --git a/vala/valaarraycreationexpression.vala b/vala/valaarraycreationexpression.vala index 2cdd3bbf0..70fc4425a 100644 --- a/vala/valaarraycreationexpression.vala +++ b/vala/valaarraycreationexpression.vala @@ -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"); }