From: Rico Tzschichholz Date: Tue, 23 Oct 2018 13:57:29 +0000 (+0200) Subject: vala: DataType for GLib.Error should be should resolved as ErrorType X-Git-Tag: 0.43.1~175 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92c0c68741107cf58bd6e32cb6a67979210609cd;p=thirdparty%2Fvala.git vala: DataType for GLib.Error should be should resolved as ErrorType --- diff --git a/vala/valasemanticanalyzer.vala b/vala/valasemanticanalyzer.vala index c0c075f9a..3a5dea6fe 100644 --- a/vala/valasemanticanalyzer.vala +++ b/vala/valasemanticanalyzer.vala @@ -343,8 +343,13 @@ public class Vala.SemanticAnalyzer : CodeVisitor { List 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 ()) {