]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: DataType for GLib.Error should be should resolved as ErrorType 92c0c68741107cf58bd6e32cb6a67979210609cd
authorRico Tzschichholz <ricotz@ubuntu.com>
Tue, 23 Oct 2018 13:57:29 +0000 (15:57 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Tue, 23 Oct 2018 16:45:49 +0000 (18:45 +0200)
vala/valasemanticanalyzer.vala

index c0c075f9aa361b66bd901c477e8f2153b8ea1d5d..3a5dea6fe0986f5328ff8dd400d83409834dea1e 100644 (file)
@@ -343,8 +343,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 ()) {