From: Rico Tzschichholz Date: Mon, 14 May 2018 09:06:30 +0000 (+0200) Subject: vala: Report an error if rank attribute is required but was not found X-Git-Tag: 0.34.18~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb25225bd3a08565bdc931cf70f92352fbc033db;p=thirdparty%2Fvala.git vala: Report an error if rank attribute is required but was not found https://bugzilla.gnome.org/show_bug.cgi?id=660991 --- 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; } } }