[vala/0.40] vala: DataType for GLib.Error should be should resolved as ErrorType



commit f15bc7c983609c750ccca41fc049f9a985e87630
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Tue Oct 23 15:57:29 2018 +0200

    vala: DataType for GLib.Error should be should resolved as ErrorType

 vala/valasemanticanalyzer.vala | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/vala/valasemanticanalyzer.vala b/vala/valasemanticanalyzer.vala
index ddf6f2859..cdad1e8d3 100644
--- a/vala/valasemanticanalyzer.vala
+++ b/vala/valasemanticanalyzer.vala
@@ -341,8 +341,13 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
 
                List<TypeParameter> type_parameters = null;
                if (sym is ObjectTypeSymbol) {
-                       type = new ObjectType ((ObjectTypeSymbol) sym);
-                       type_parameters = ((ObjectTypeSymbol) sym).get_type_parameters ();
+                       var cl = sym as Class;
+                       if (cl != null && cl.is_error_base) {
+                               type = new ErrorType (null, null);
+                       } else {
+                               type = new ObjectType ((ObjectTypeSymbol) sym);
+                               type_parameters = ((ObjectTypeSymbol) sym).get_type_parameters ();
+                       }
                } else if (sym is Struct) {
                        var st = (Struct) sym;
                        if (st.is_boolean_type ()) {


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