[vala/staging] vala: Return early for invalid initializer of local variable declarations
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] vala: Return early for invalid initializer of local variable declarations
- Date: Sat, 22 Sep 2018 08:45:35 +0000 (UTC)
commit 9584ad4a79840b0ae0c5e23b3416899b81bee88f
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Fri Sep 21 21:43:17 2018 +0200
vala: Return early for invalid initializer of local variable declarations
vala/valalocalvariable.vala | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/vala/valalocalvariable.vala b/vala/valalocalvariable.vala
index 22d7c6991..9391bdc54 100644
--- a/vala/valalocalvariable.vala
+++ b/vala/valalocalvariable.vala
@@ -100,7 +100,10 @@ public class Vala.LocalVariable : Variable {
is_initializer_list = true;
}
- initializer.check (context);
+ if (!initializer.check (context)) {
+ error = true;
+ return false;
+ }
}
if (variable_type == null) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]