From: Rico Tzschichholz Date: Thu, 2 Jul 2020 14:50:36 +0000 (+0200) Subject: vala: Improve error handling of nested initializer lists X-Git-Tag: 0.49.1~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=605e50e1a678ce239e6a7c02eec1356bbe94de3b;p=thirdparty%2Fvala.git vala: Improve error handling of nested initializer lists This avoids reporting consequential errors. --- diff --git a/vala/valainitializerlist.vala b/vala/valainitializerlist.vala index 93411e470..ea6fc44e2 100644 --- a/vala/valainitializerlist.vala +++ b/vala/valainitializerlist.vala @@ -255,10 +255,15 @@ public class Vala.InitializerList : Expression { } foreach (Expression expr in initializers) { - expr.check (context); + if (!expr.check (context)) { + error = true; + } + } + + if (error) { + return false; } - bool error = false; foreach (Expression e in get_initializers ()) { if (e.value_type == null) { error = true;