From 145bfaf7be06daedade0048b938ceb29169081f9 Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Tue, 20 Apr 2021 14:05:55 +0200 Subject: [PATCH] vala: length-type of arrays must not be nullable (2) --- vala/valaarraycreationexpression.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"); } -- 2.47.2