]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Return early for invalid initializer of local variable declarations
authorRico Tzschichholz <ricotz@ubuntu.com>
Fri, 21 Sep 2018 19:43:17 +0000 (21:43 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Fri, 21 Sep 2018 20:45:52 +0000 (22:45 +0200)
vala/valalocalvariable.vala

index 22d7c6991835302b7cd0b6b7f57aec4f38c46c30..9391bdc5484c7028e4ec66231a34dfecfd74ffe3 100644 (file)
@@ -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) {