]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
girwriter: Report error on secondary top-level namespace to be written 5e96fb6def3ac57f4f67f3064863a3aef6cd651f
authorRico Tzschichholz <ricotz@ubuntu.com>
Fri, 14 Jun 2019 06:16:23 +0000 (08:16 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Fri, 14 Jun 2019 06:37:44 +0000 (08:37 +0200)
Fixes https://gitlab.gnome.org/GNOME/vala/issues/805

codegen/valagirwriter.vala

index 0c7c5b9872559cdc783a74e0d4f812f068f43a05..3406f8ee613ee916664e883b066618189ed8b3a7 100644 (file)
@@ -332,6 +332,11 @@ public class Vala.GIRWriter : CodeVisitor {
                        return;
                }
 
+               if (our_namespaces.size > 0) {
+                       Report.error (ns.source_reference, "Secondary top-level namespace `%s' is not supported by GIR format".printf (ns.name));
+                       return;
+               }
+
                write_c_includes (ns);
 
                write_indent ();