From: Luca Bruno Date: Thu, 5 May 2011 17:22:16 +0000 (+0200) Subject: girparser: Merge all nodes that collide with a property and are getters X-Git-Tag: 0.13.0~155 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95dcebddd3015b3c17db2462881d90295c8c925e;p=thirdparty%2Fvala.git girparser: Merge all nodes that collide with a property and are getters --- diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala index 65b83c2d3..b1b406b4a 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; }