summaryrefslogtreecommitdiff
path: root/vala/valablock.vala
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2010-03-21 14:50:04 +0100
committerJürg Billeter <j@bitron.ch>2010-03-21 14:50:04 +0100
commit6403bfbadf61e4ab4d62b000c2842f461578ada6 (patch)
tree3979f9aa0191ea78ec9582e564ffd7a2b190a2ca /vala/valablock.vala
parent67289a76c898fc17f15187ff8fc170d54c5f04ad (diff)
downloadvala-6403bfbadf61e4ab4d62b000c2842f461578ada6.tar.gz
Fix variable shadowing check with implicit result variable in properties
Diffstat (limited to 'vala/valablock.vala')
-rw-r--r--vala/valablock.vala4
1 files changed, 2 insertions, 2 deletions
diff --git a/vala/valablock.vala b/vala/valablock.vala
index 3a7eac7aa..85a74cdb7 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;