[vala] girparser: Merge all nodes that collide with a property and are getters



commit 95dcebddd3015b3c17db2462881d90295c8c925e
Author: Luca Bruno <lucabru src gnome org>
Date:   Thu May 5 19:22:16 2011 +0200

    girparser: Merge all nodes that collide with a property and are getters

 vala/valagirparser.vala |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 65b83c2..b1b406b 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -681,7 +681,7 @@ public class Vala.GirParser : CodeVisitor {
 					}
 					var prop = (Property) symbol;
 					if (prop.no_accessor_method) {
-						// property getter and setter must be matched both, otherwise it's NoAccessorMethod
+						// property getter and setter must both match, otherwise it's NoAccessorMethod
 						prop.no_accessor_method = false;
 						if (prop.get_accessor != null) {
 							var m = getter != null ? getter.symbol as Method : null;
@@ -691,7 +691,11 @@ public class Vala.GirParser : CodeVisitor {
 									prop.no_accessor_method = true;
 								} else {
 									if (getter.name == name) {
-										getter.merged = true;
+										foreach (var node in colliding) {
+											if (node.symbol is Method) {
+												node.merged = true;
+											}
+										}
 									}
 									prop.get_accessor.value_type.value_owned = m.return_type.value_owned;
 								}



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