[vala] Fix variable shadowing check with implicit result variable in properties
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] Fix variable shadowing check with implicit result variable in properties
- Date: Sun, 21 Mar 2010 13:51:48 +0000 (UTC)
commit 6403bfbadf61e4ab4d62b000c2842f461578ada6
Author: Jürg Billeter <j bitron ch>
Date: Sun Mar 21 14:50:04 2010 +0100
Fix variable shadowing check with implicit result variable in properties
vala/valablock.vala | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/vala/valablock.vala b/vala/valablock.vala
index 3a7eac7..85a74cd 100644
--- a/vala/valablock.vala
+++ b/vala/valablock.vala
@@ -1,6 +1,6 @@
/* valablock.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
@@ -88,7 +88,7 @@ public class Vala.Block : Symbol, Statement {
*/
public void add_local_variable (LocalVariable local) {
var parent_block = parent_symbol;
- while (parent_block is Block || parent_block is Method) {
+ while (parent_block is Block || parent_block is Method || parent_block is PropertyAccessor) {
if (parent_block.scope.lookup (local.name) != null) {
Report.error (local.source_reference, "Local variable `%s' conflicts with another local variable declared in a parent scope".printf (local.name));
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]