[vala] Fix expression type of new GLib.Error (...)
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] Fix expression type of new GLib.Error (...)
- Date: Mon, 1 Mar 2010 15:28:11 +0000 (UTC)
commit ca997edb8d1fd28ffb2e9897c4de9e0511b11239
Author: Jürg Billeter <j bitron ch>
Date: Mon Mar 1 16:27:11 2010 +0100
Fix expression type of new GLib.Error (...)
Fixes bug 610584.
vala/valaobjectcreationexpression.vala | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/vala/valaobjectcreationexpression.vala b/vala/valaobjectcreationexpression.vala
index f0c9108..9f1def9 100644
--- a/vala/valaobjectcreationexpression.vala
+++ b/vala/valaobjectcreationexpression.vala
@@ -1,6 +1,6 @@
/* valaobjectcreationexpression.vala
*
- * Copyright (C) 2006-2009 Jürg Billeter
+ * Copyright (C) 2006-2010 Jürg Billeter
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -200,7 +200,11 @@ public class Vala.ObjectCreationExpression : Expression {
if (type_sym is Class) {
type = (TypeSymbol) type_sym;
- type_reference = new ObjectType ((Class) type);
+ if (((Class) type).is_error_base) {
+ type_reference = new ErrorType (null, null, source_reference);
+ } else {
+ type_reference = new ObjectType ((Class) type);
+ }
} else if (type_sym is Struct) {
type = (TypeSymbol) type_sym;
type_reference = new StructValueType ((Struct) type);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]