]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Merge attributes on merge of namespace
authorMaciej Piechotka <uzytkownik2@gmail.com>
Mon, 19 Dec 2011 02:24:28 +0000 (03:24 +0100)
committerJürg Billeter <j@bitron.ch>
Thu, 12 Jul 2012 12:09:09 +0000 (14:09 +0200)
On merge the attribute of second namespace were silently ignored. This patch
treats them as they were specified sequentially.

Fixes bug 666478.

vala/valanamespace.vala

index 7506e25db5d0196cf2523fa8018c105ec75425f8..b605ac646cc44b5f664082cc9faca2d5029d05a9 100644 (file)
@@ -129,6 +129,11 @@ public class Vala.Namespace : Symbol {
                        foreach (Comment c in ns.get_comments ()) {
                                old_ns.add_comment (c);
                        }
+                       foreach (Attribute a in ns.attributes) {
+                               if (old_ns.get_attribute (a.name) == null) {
+                                       old_ns.attributes.append(a);
+                               }
+                       }
                } else {
                        namespaces.add (ns);
                        scope.add (ns.name, ns);