vala r1349 - in trunk: . vala



Author: juergbi
Date: Thu May  8 21:11:17 2008
New Revision: 1349
URL: http://svn.gnome.org/viewvc/vala?rev=1349&view=rev

Log:
2008-05-08  Juerg Billeter  <j bitron ch>

	* vala/valastruct.vala:

	Support `this' in struct creation methods,
	patch by Jared Moore, fixes bug 527770


Modified:
   trunk/ChangeLog
   trunk/vala/valastruct.vala

Modified: trunk/vala/valastruct.vala
==============================================================================
--- trunk/vala/valastruct.vala	(original)
+++ trunk/vala/valastruct.vala	Thu May  8 21:11:17 2008
@@ -125,7 +125,7 @@
 	public void add_method (Method m) {
 		return_if_fail (m != null);
 		
-		if (m.binding == MemberBinding.INSTANCE) {
+		if (m.binding == MemberBinding.INSTANCE || m is CreationMethod) {
 			m.this_parameter = new FormalParameter ("this", new ValueType (this));
 			m.scope.add (m.this_parameter.name, m.this_parameter);
 		}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]