]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
girparser: Handle metadata for fields inside a transparent union
authorRico Tzschichholz <ricotz@ubuntu.com>
Thu, 7 Dec 2017 16:32:54 +0000 (17:32 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sat, 9 Dec 2017 07:40:38 +0000 (08:40 +0100)
vala/valagirparser.vala

index 9d471f0f589f823ed399016624f6d21c96dcfa5c..0ea1ca26bb67427e08528f3ec16bb1d774b1beae 100644 (file)
@@ -1592,6 +1592,10 @@ public class Vala.GirParser : CodeVisitor {
                if (child_name == null) {
                        child_name = reader.get_attribute ("glib:name");
                }
+               // Give a transparent union the generic name "union"
+               if (selector == "union" && child_name == null) {
+                       child_name = "union";
+               }
                if (child_name == null) {
                        return Metadata.empty;
                }