]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Improve error reporting for local variable initializers
authorJürg Billeter <j@bitron.ch>
Sat, 20 Mar 2010 16:05:24 +0000 (17:05 +0100)
committerJürg Billeter <j@bitron.ch>
Sat, 20 Mar 2010 16:05:24 +0000 (17:05 +0100)
vala/valalocalvariable.vala

index 917e4b76bc669d6ea6e8d39a332fc2ab49664522..72dbe8371d74cd87d7b24c43ef05e8062f17661c 100644 (file)
@@ -1,6 +1,6 @@
 /* valalocalvariable.vala
  *
- * Copyright (C) 2006-2009  Jürg Billeter
+ * Copyright (C) 2006-2010  Jürg Billeter
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -148,7 +148,7 @@ public class Vala.LocalVariable : Symbol {
                        initializer.target_type = variable_type;
                }
 
-               if (initializer != null) {
+               if (initializer != null && !initializer.error) {
                        if (initializer.value_type == null) {
                                if (!(initializer is MemberAccess) && !(initializer is LambdaExpression)) {
                                        error = true;