]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Report an error if rank attribute is required but was not found
authorRico Tzschichholz <ricotz@ubuntu.com>
Mon, 14 May 2018 09:06:30 +0000 (11:06 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 21 May 2018 16:19:44 +0000 (18:19 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=660991

vala/valastruct.vala

index 21985d7af3420a72be8a49c1b9cf2210db3ac2fa..12480fc41d7cb660f218ced0b4f7f082b3219653 100644 (file)
@@ -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;
                                }
                        }
                }