]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
girparser: Merge all nodes that collide with a property and are getters
authorLuca Bruno <lucabru@src.gnome.org>
Thu, 5 May 2011 17:22:16 +0000 (19:22 +0200)
committerLuca Bruno <lucabru@src.gnome.org>
Thu, 5 May 2011 17:32:52 +0000 (19:32 +0200)
vala/valagirparser.vala

index 65b83c2d370d96be65d59fe2ead31cb722425513..b1b406b4ad14df9955b366e5a728cf5cb65f3cb0 100644 (file)
@@ -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;
                                                                }