vala r971 - in trunk: . vala
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r971 - in trunk: . vala
- Date: Tue, 5 Feb 2008 10:39:55 +0000 (GMT)
Author: juergbi
Date: Tue Feb 5 10:39:54 2008
New Revision: 971
URL: http://svn.gnome.org/viewvc/vala?rev=971&view=rev
Log:
2008-02-05 Juerg Billeter <j bitron ch>
* vala/valapointertype.vala, vala/valasemanticanalyzer.vala: support
addressof expressions for reference types, fixes bug 514495
Modified:
trunk/ChangeLog
trunk/vala/valapointertype.vala
trunk/vala/valasemanticanalyzer.vala
Modified: trunk/vala/valapointertype.vala
==============================================================================
--- trunk/vala/valapointertype.vala (original)
+++ trunk/vala/valapointertype.vala Tue Feb 5 10:39:54 2008
@@ -1,6 +1,6 @@
/* valapointertype.vala
*
- * Copyright (C) 2007 JÃrg Billeter
+ * Copyright (C) 2007-2008 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
@@ -60,6 +60,11 @@
return true;
}
+ if (base_type.is_reference_type_or_type_parameter ()) {
+ // Object* is compatible with Object if Object is a reference type
+ return base_type.compatible (target_type, enable_non_null);
+ }
+
return false;
}
Modified: trunk/vala/valasemanticanalyzer.vala
==============================================================================
--- trunk/vala/valasemanticanalyzer.vala (original)
+++ trunk/vala/valasemanticanalyzer.vala Tue Feb 5 10:39:54 2008
@@ -2323,7 +2323,11 @@
return;
}
- expr.static_type = new PointerType (expr.inner.static_type);
+ if (expr.inner.static_type.is_reference_type_or_type_parameter ()) {
+ expr.static_type = new PointerType (new PointerType (expr.inner.static_type));
+ } else {
+ expr.static_type = new PointerType (expr.inner.static_type);
+ }
}
public override void visit_reference_transfer_expression (ReferenceTransferExpression! expr) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]