[vala/0.52] vala: length-type of arrays must not be nullable
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.52] vala: length-type of arrays must not be nullable
- Date: Mon, 26 Apr 2021 10:58:16 +0000 (UTC)
commit 1cbe715afb3bdc233bdf75e403c0d70b5da983fc
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Thu Apr 15 16:49:14 2021 +0200
vala: length-type of arrays must not be nullable
vala/valaarraytype.vala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/vala/valaarraytype.vala b/vala/valaarraytype.vala
index 2468edf20..85b7b1f45 100644
--- a/vala/valaarraytype.vala
+++ b/vala/valaarraytype.vala
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]