From 9bb9b108ae1a173e5c5251955be9d8e5698d8c5f Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Mon, 14 May 2018 11:06:30 +0200 Subject: [PATCH] vala: Report an error if rank attribute is required but was not found https://bugzilla.gnome.org/show_bug.cgi?id=660991 --- vala/valastruct.vala | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vala/valastruct.vala b/vala/valastruct.vala index 21985d7af..12480fc41 100644 --- a/vala/valastruct.vala +++ b/vala/valastruct.vala @@ -368,6 +368,9 @@ public class Vala.Struct : TypeSymbol { var st = base_struct; if (st != null) { rank = st.get_rank (); + } else { + Report.error (source_reference, "internal error: struct has no rank"); + return 0; } } } -- 2.11.4.GIT