[vala] Improve error reporting for local variable initializers



commit 5ee8ced9cde62013fec4fb8e0ffc97d5f31cbd0e
Author: Jürg Billeter <j bitron ch>
Date:   Sat Mar 20 17:05:24 2010 +0100

    Improve error reporting for local variable initializers

 vala/valalocalvariable.vala |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/vala/valalocalvariable.vala b/vala/valalocalvariable.vala
index 917e4b7..72dbe83 100644
--- a/vala/valalocalvariable.vala
+++ b/vala/valalocalvariable.vala
@@ -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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]