[vala/0.44] girwriter: Report error on secondary top-level namespace to be written



commit c0b920e47a1bb75d1294dae29f99e6141624f81f
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Fri Jun 14 08:16:23 2019 +0200

    girwriter: Report error on secondary top-level namespace to be written
    
    Fixes https://gitlab.gnome.org/GNOME/vala/issues/805

 codegen/valagirwriter.vala | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/codegen/valagirwriter.vala b/codegen/valagirwriter.vala
index 0c7c5b987..3406f8ee6 100644
--- a/codegen/valagirwriter.vala
+++ b/codegen/valagirwriter.vala
@@ -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 ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]