[vala/wip/ricotz/lsp-rev: 11/11] WIP vala: Unresolved namespaces?



commit bc3b0f8a974407ecc02fd813152646b6ef20c400
Author: Princeton Ferro <princetonferro gmail com>
Date:   Tue Feb 18 12:20:00 2020 +0100

    WIP vala: Unresolved namespaces?

 vala/valagirparser.vala | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 88f874d8f..cd665b326 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -1394,6 +1394,12 @@ public class Vala.GirParser : CodeVisitor {
                                continue;
                        }
 
+                       if (ns == null) {
+                               // We should not have a null namespace unless we're in LSP mode.
+                               assert (context.keep_going);
+                               continue;
+                       }
+
                        provided_namespaces.add ("%s-%s".printf (gir_namespace, gir_version));
 
                        var gir_symbol = new UnresolvedSymbol (null, gir_namespace);


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