From: Jürg Billeter Date: Mon, 1 Mar 2010 15:27:11 +0000 (+0100) Subject: Fix expression type of new GLib.Error (...) X-Git-Tag: 0.8.0~240 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ca997edb8d1fd28ffb2e9897c4de9e0511b11239;p=thirdparty%2Fvala.git Fix expression type of new GLib.Error (...) Fixes bug 610584. --- diff --git a/vala/valaobjectcreationexpression.vala b/vala/valaobjectcreationexpression.vala index f0c910822..9f1def9e4 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);