From 92c0c68741107cf58bd6e32cb6a67979210609cd Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Tue, 23 Oct 2018 15:57:29 +0200 Subject: [PATCH] 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 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 ()) { -- 2.47.2