From: Jürg Billeter Date: Sat, 20 Mar 2010 16:05:24 +0000 (+0100) Subject: Improve error reporting for local variable initializers X-Git-Tag: 0.8.0~143 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5ee8ced9cde62013fec4fb8e0ffc97d5f31cbd0e;p=thirdparty%2Fvala.git Improve error reporting for local variable initializers --- diff --git a/vala/valalocalvariable.vala b/vala/valalocalvariable.vala index 917e4b76b..72dbe8371 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;