[vala/staging] vala: Set GLib.Error as symbol of error-types if no error-domain was given



commit bdd13823bd64275361f7af9fb78a4e31dd13270f
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sat Nov 9 15:20:11 2019 +0100

    vala: Set GLib.Error as symbol of error-types if no error-domain was given

 vala/valaerrortype.vala     | 2 +-
 valadoc/symbolresolver.vala | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/vala/valaerrortype.vala b/vala/valaerrortype.vala
index 26edcaddd..4fc6156e2 100644
--- a/vala/valaerrortype.vala
+++ b/vala/valaerrortype.vala
@@ -44,7 +44,7 @@ public class Vala.ErrorType : ReferenceType {
        public bool dynamic_error { get; set; }
 
        public ErrorType (ErrorDomain? error_domain, ErrorCode? error_code, SourceReference? source_reference 
= null) {
-               base (error_domain);
+               base ((Symbol) error_domain ?? CodeContext.get ().root.scope.lookup ("GLib").scope.lookup 
("Error"));
                this.error_code = error_code;
                this.source_reference = source_reference;
        }
diff --git a/valadoc/symbolresolver.vala b/valadoc/symbolresolver.vala
index 94b2bc460..20021c5fa 100644
--- a/valadoc/symbolresolver.vala
+++ b/valadoc/symbolresolver.vala
@@ -41,7 +41,7 @@ public class Valadoc.SymbolResolver : Visitor {
                var error_types = new Vala.ArrayList<Vala.DataType> ();
                vala_symbol.get_error_types (error_types);
                foreach (Vala.DataType type in error_types) {
-                       unowned Vala.ErrorDomain vala_edom = (Vala.ErrorDomain) type.type_symbol;
+                       unowned Vala.ErrorDomain? vala_edom = ((Vala.ErrorType) type).error_domain;
                        Symbol? edom = symbol_map.get (vala_edom);
                        symbol.add_child (edom ?? glib_error);
                }


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