[vala/staging] vala: DataType for GLib.Error should be should resolved as ErrorType
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] vala: DataType for GLib.Error should be should resolved as ErrorType
- Date: Tue, 23 Oct 2018 14:47:52 +0000 (UTC)
commit a3641bc4f77b6c09f8c1a4019dfc906a0399f69e
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 c0c075f9a..3a5dea6fe 100644
--- a/vala/valasemanticanalyzer.vala
+++ b/vala/valasemanticanalyzer.vala
@@ -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 ()) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]