[vala/0.36] 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/0.36] vala: DataType for GLib.Error should be should resolved as ErrorType
- Date: Sun, 28 Oct 2018 11:47:43 +0000 (UTC)
commit 85089567993826c56d176430d1e9e5c6668cc73b
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 95ae1f0d3..dbef191aa 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]